Lines Matching full:mbus
162 struct mii_bus *mbus; /* mdio master */ member
201 static int ar9331_sw_mbus_write(struct mii_bus *mbus, int port, int regnum, in ar9331_sw_mbus_write() argument
204 struct ar9331_sw_priv *priv = mbus->priv; in ar9331_sw_mbus_write()
231 static int ar9331_sw_mbus_read(struct mii_bus *mbus, int port, int regnum) in ar9331_sw_mbus_read() argument
233 struct ar9331_sw_priv *priv = mbus->priv; in ar9331_sw_mbus_read()
268 struct mii_bus *mbus; in ar9331_sw_mbus_init() local
274 mbus = devm_mdiobus_alloc(dev); in ar9331_sw_mbus_init()
275 if (!mbus) in ar9331_sw_mbus_init()
278 mbus->name = np->full_name; in ar9331_sw_mbus_init()
279 snprintf(mbus->id, MII_BUS_ID_SIZE, "%pOF", np); in ar9331_sw_mbus_init()
281 mbus->read = ar9331_sw_mbus_read; in ar9331_sw_mbus_init()
282 mbus->write = ar9331_sw_mbus_write; in ar9331_sw_mbus_init()
283 mbus->priv = priv; in ar9331_sw_mbus_init()
284 mbus->parent = dev; in ar9331_sw_mbus_init()
290 ret = of_mdiobus_register(mbus, mnp); in ar9331_sw_mbus_init()
295 priv->mbus = mbus; in ar9331_sw_mbus_init()
836 mdiobus_unregister(priv->mbus); in ar9331_sw_remove()