Lines Matching refs:mii_bus

42  * mdiobus_alloc_size - allocate a mii_bus structure
46 * Description: called by a bus driver to allocate an mii_bus
49 struct mii_bus *mdiobus_alloc_size(size_t size)
51 struct mii_bus *bus;
74 mdiobus_free(*(struct mii_bus **)res);
79 struct mii_bus **r = res;
89 * @dev: Device to allocate mii_bus for
92 * Managed mdiobus_alloc_size. mii_bus allocated with this function is
95 * If an mii_bus allocated with this function needs to be freed separately,
99 * Pointer to allocated mii_bus on success, NULL on failure.
101 struct mii_bus *devm_mdiobus_alloc_size(struct device *dev, int sizeof_priv)
103 struct mii_bus **ptr, *bus;
124 * @dev: Device this mii_bus belongs to
125 * @bus: the mii_bus associated with the device
127 * Free mii_bus allocated with devm_mdiobus_alloc_size().
129 void devm_mdiobus_free(struct device *dev, struct mii_bus *bus)
140 * mdiobus_release - mii_bus device release callback
141 * @d: the target struct device that contains the mii_bus
143 * Description: called when the last reference to an mii_bus is
148 struct mii_bus *bus = to_mii_bus(d);
167 * of_mdio_find_bus - Given an mii_bus node, find the mii_bus.
168 * @mdio_bus_np: Pointer to the mii_bus.
170 * Returns a pointer to the mii_bus, or NULL if none found.
172 * Because the association of a device_node and mii_bus is made via
173 * of_mdiobus_register(), the mii_bus cannot be found before it is
177 struct mii_bus *of_mdio_find_bus(struct device_node *mdio_bus_np)
196 static void of_mdiobus_link_phydev(struct mii_bus *mdio,
230 static inline void of_mdiobus_link_phydev(struct mii_bus *mdio,
238 * @bus: target mii_bus
245 int mdiobus_register(struct mii_bus *bus)
263 pr_err("mii_bus %s failed to register\n", bus->id);
299 void mdiobus_unregister(struct mii_bus *bus)
316 * mdiobus_free - free a struct mii_bus
317 * @bus: mii_bus to free
320 * object in the mii_bus. If this is the last reference, the mii_bus
323 void mdiobus_free(struct mii_bus *bus)
338 struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr)
365 * @bus: the mii_bus struct
373 int mdiobus_read(struct mii_bus *bus, int addr, u32 regnum)
389 * @bus: the mii_bus struct
398 int mdiobus_write(struct mii_bus *bus, int addr, u32 regnum, u16 val)