of_mdio_find_bus(9)
π of_mdio_find_bus(9) π
okay so bestie, welcome to the Kernel API Manual page for of_mdio_find_bus. this is the one where you hand over an mii_bus node and she finds the mii_bus for you. slay. β¨
π NAME π
of_mdio_find_bus β Given an mii_bus node, find the mii_bus.
πΈ SYNOPSIS πΈ
struct mii_bus * of_mdio_find_bus (struct device_node *mdio_bus_np );
π¦ ARGUMENTS π¦
mdio_bus_npβ Pointer to themii_bus. that's it, that's the argument. π
β RETURN β
a reference to the mii_bus, or NULL if none found. The embedded struct device will have its reference count incremented, and this must be put once the bus is finished with.
π«Ά real talk: that reference count bump is not decorative β you gotta put it when you're done with the bus. periodt.
π₯ DESCRIPTION π₯
Because the association of a device_node and mii_bus is made via of_mdiobus_register, the mii_bus cannot be found before it is registered with of_mdiobus_register.
like, she doesn't exist to this lookup until of_mdiobus_register has made the association. so don't come looking early β the vibe check will fail. π
π§ SEE ALSO π§
Kernel file ./drivers/net/phy/mdio_bus_provider.c β and the whole bestie lineup:
mdiobus_release(9)mdio_bus_match(9)mdiobus_alloc_size(9)mdiobus_scan_c22(9)mdiobus_scan_c45(9)__mdiobus_register(9)mdiobus_free(9)mdio_find_bus(9)
source/version: ./drivers/net/phy β’ date: October 2026 β’ page: of_mdio_find_bus(9) β mwah, bye bestie! ππβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms