Lines Matching refs:sbus

246 	struct mii_bus *sbus; /* mdio slave */  member
830 static int __ar9331_mdio_write(struct mii_bus *sbus, u8 mode, u16 reg, u16 val) in __ar9331_mdio_write() argument
838 return __mdiobus_write(sbus, p, r, val); in __ar9331_mdio_write()
841 static int __ar9331_mdio_read(struct mii_bus *sbus, u16 reg) in __ar9331_mdio_read() argument
849 return __mdiobus_read(sbus, p, r); in __ar9331_mdio_read()
856 struct mii_bus *sbus = priv->sbus; in ar9331_mdio_read() local
869 mutex_lock_nested(&sbus->mdio_lock, MDIO_MUTEX_NESTED); in ar9331_mdio_read()
871 ret = __ar9331_mdio_read(sbus, reg); in ar9331_mdio_read()
876 ret = __ar9331_mdio_read(sbus, reg + 2); in ar9331_mdio_read()
882 mutex_unlock(&sbus->mdio_lock); in ar9331_mdio_read()
886 mutex_unlock(&sbus->mdio_lock); in ar9331_mdio_read()
887 dev_err_ratelimited(&sbus->dev, "Bus error. Failed to read register.\n"); in ar9331_mdio_read()
895 struct mii_bus *sbus = priv->sbus; in ar9331_mdio_write() local
898 mutex_lock_nested(&sbus->mdio_lock, MDIO_MUTEX_NESTED); in ar9331_mdio_write()
900 ret = __ar9331_mdio_write(sbus, AR9331_SW_MDIO_PHY_MODE_PAGE, in ar9331_mdio_write()
905 mutex_unlock(&sbus->mdio_lock); in ar9331_mdio_write()
917 ret = __ar9331_mdio_write(sbus, AR9331_SW_MDIO_PHY_MODE_REG, reg + 2, in ar9331_mdio_write()
922 ret = __ar9331_mdio_write(sbus, AR9331_SW_MDIO_PHY_MODE_REG, reg, val); in ar9331_mdio_write()
926 mutex_unlock(&sbus->mdio_lock); in ar9331_mdio_write()
931 mutex_unlock(&sbus->mdio_lock); in ar9331_mdio_write()
932 dev_err_ratelimited(&sbus->dev, "Bus error. Failed to write register.\n"); in ar9331_mdio_write()
1049 priv->sbus = mdiodev->bus; in ar9331_sw_probe()