__of_mdiobus_register(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __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 the mii_bus structure. this is the bus we're about to make official, bestie πŸ’…
  • np β€” pointer to the device_node of the MDIO bus. this is the device-tree node whose children get to become PHYs ✨
  • owner β€” the module that owns the mdio object. gotta keep the refcount people happy 🫢

πŸ‘‘ DESCRIPTION πŸ‘‘

so what does it actually do? two things, and it ate:

  1. it registers the mii_bus structure πŸ“
  2. it registers a phy_device for each child node of np 🌈

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 πŸ”

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