__of_mdiobus_register(9)
π
__of_mdiobus_register(9) β the Kernel API Manual, bestie edition π¦
okay so this is a page straight out of the Kernel API Manual and honestly? it's a little gem. it's the low-level, double-underscore version of registering an MDIO bus and letting the device tree do its thing. iykyk π
β¨ SYNOPSIS β¨
int __of_mdiobus_register (struct mii_bus *mdio , struct device_node *np
, struct module *owner );
three args, one int back, no drama. periodt. π
πΈ ARGUMENTS πΈ
mdioβ pointer to themii_busstructure. this is the bus we're about to make official, bestie πnpβ pointer to thedevice_nodeof the MDIO bus. this is the device-tree node whose children get to become PHYs β¨ownerβ the module that owns themdioobject. gotta keep the refcount people happy π«Ά
π DESCRIPTION π
so what does it actually do? two things, and it ate:
- it registers the
mii_busstructure π - it registers a
phy_devicefor each child node ofnpπ
that's it. that's the function. main character energy, minimal dialogue π₯
ngl, this is the internal one (look at those leading underscores) β the device tree is doing the heavy lifting here, walking every child of np and turning them into PHYs for you. no cap.
π SEE ALSO π
- Kernel file
./drivers/net/mdio/of_mdio.c of_mdio_find_device(9)of_phy_find_device(9)of_phy_connect(9)of_phy_get_and_connect(9)
go read ./drivers/net/mdio/of_mdio.c if you wanna see the whole vibe in context, fr fr ππ
and that's the page!! π§ from the ./drivers/net/mdio source, dated October 2026, signed off as __of_mdiobus_register(9) β slay, go register some PHYs 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