of_phy_get_and_connect(9)
π NAME π
of_phy_get_and_connect(9) β welcome to the Kernel API Manual, bestie π«Ά. And honestly? The original NAME entry is literally just of_phy_get_and_connect - with the description left blank π. No cap, that's the whole vibe.
β¨ SYNOPSIS β¨
struct phy_device * of_phy_get_and_connect (struct net_device *dev ,
struct device_node *np , void (*hndlr)(struct net_device *) );
π ARGUMENTS π
devβ pointer tonet_deviceclaiming the phy πnpβ Pointer to device tree node for thenet_deviceclaiming the phy πΈhndlrβ Link state callback for the network device π
π¦ DESCRIPTION π¦
- Get phy node and connect to the phy described in the device tree π
If successful, returns a pointer to the phy_device with the embedded struct device refcount incremented by one, or NULL on failure π. The refcount must be dropped by calling phy_disconnect or phy_detach β like, fr fr, don't forget this part π«Ά.
β οΈ Bestie, that refcount is not decorative. It must be dropped withphy_disconnectorphy_detach, periodt.
π SEE ALSO π
Kernel file ./drivers/net/mdio/of_mdio.c β and the whole crew: __of_mdiobus_register(9), of_mdio_find_device(9), of_phy_find_device(9), of_phy_connect(9) β¨π¦
Signed off from ./drivers/net/mdio, dated October 2026 π β stay iconic, keep your refcounts tidy, and slay the device tree π
π¦ 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