Lines Matching refs:mbus
164 struct mii_bus *mbus; /* mdio master */ member
203 static int ar9331_sw_mbus_write(struct mii_bus *mbus, int port, int regnum, in ar9331_sw_mbus_write() argument
206 struct ar9331_sw_priv *priv = mbus->priv; in ar9331_sw_mbus_write()
233 static int ar9331_sw_mbus_read(struct mii_bus *mbus, int port, int regnum) in ar9331_sw_mbus_read() argument
235 struct ar9331_sw_priv *priv = mbus->priv; in ar9331_sw_mbus_read()
270 struct mii_bus *mbus; in ar9331_sw_mbus_init() local
276 mbus = devm_mdiobus_alloc(dev); in ar9331_sw_mbus_init()
277 if (!mbus) in ar9331_sw_mbus_init()
280 mbus->name = np->full_name; in ar9331_sw_mbus_init()
281 snprintf(mbus->id, MII_BUS_ID_SIZE, "%pOF", np); in ar9331_sw_mbus_init()
283 mbus->read = ar9331_sw_mbus_read; in ar9331_sw_mbus_init()
284 mbus->write = ar9331_sw_mbus_write; in ar9331_sw_mbus_init()
285 mbus->priv = priv; in ar9331_sw_mbus_init()
286 mbus->parent = dev; in ar9331_sw_mbus_init()
292 ret = devm_of_mdiobus_register(dev, mbus, mnp); in ar9331_sw_mbus_init()
297 priv->mbus = mbus; in ar9331_sw_mbus_init()