fwnode_get_phy_node(9)
π fwnode_get_phy_node(9) π
okay so real talk, this is a page from the Kernel API Manual and it's literally about grabbing a phy_node off a fwnode β bestie, it's giving "small function, huge friend group". let's get into it π«Ά
β¨ NAME β¨
fwnode_get_phy_node β get the phy_node using the named reference. that's it, that's the whole job π
πΈ SYNOPSIS πΈ
struct fwnode_handle * fwnode_get_phy_node (const struct fwnode_handle
*fwnode );
look at her go π returns a struct fwnode_handle *, takes a const struct fwnode_handle *. iconic signature behavior, no notes.
π ARGUMENTS π
fwnodeβ pointer to the fwnode from whichphy_nodehas to be obtained. yes literally just hand her the fwnode and she'll go get the phy_node for you, she's so nice like that π
π¦ DESCRIPTION π¦
okay so for what actually comes back, go peek at the return conditions of fwnode_find_reference β that's where the real lore lives, iykyk β¨
now the spicy part π₯ For ACPI, only "phy-handle" is supported. like, that's the whole menu, one item, no substitutions. The legacy DT properties "phy" and "phy-device" are not supported in ACPI β nope, not happening, don't even try it bestie π
DT, on the other hand, is the main character and supports all three of the named references to the phy node: "phy", "phy-device", and "phy-handle". she ate π
β SEE ALSO β
Kernel file ./drivers/net/phy/phy_device.c β and then the whole squad, fr fr:
phy_uses_state_machine(9)phy_register_fixup(9)genphy_match_phy_device(9)get_phy_c45_ids(9)get_phy_c22_id(9)get_phy_device(9)phy_device_register(9)phy_device_remove(9)phy_get_c45_ids(9)phy_find_next(9)phy_prepare_link(9)phy_connect_direct(9)phy_connect(9)phy_disconnect(9)phy_poll_reset(9)phy_sfp_connect_phy(9)phy_sfp_disconnect_phy(9)phy_sfp_attach(9)phy_sfp_detach(9)phy_sfp_probe(9)phy_attach_direct(9)phy_detach(9)phy_reset_after_clk_enable(9)genphy_config_advert(9)genphy_c37_config_advert(9)genphy_setup_forced(9)genphy_restart_aneg(9)genphy_check_and_restart_aneg(9)__genphy_config_aneg(9)genphy_c37_config_aneg(9)genphy_aneg_done(9)genphy_update_link(9)genphy_read_status_fixed(9)genphy_read_status(9)genphy_c37_read_status(9)genphy_soft_reset(9)genphy_read_abilities(9)phy_remove_link_mode(9)phy_advertise_supported(9)phy_advertise_eee_all(9)phy_support_eee(9)phy_disable_eee(9)phy_support_sym_pause(9)phy_support_asym_pause(9)phy_set_sym_pause(9)phy_set_asym_pause(9)phy_validate_pause(9)phy_get_pause(9)phy_get_internal_delay(9)phy_get_tx_amplitude_gain(9)phy_get_mac_termination(9)phy_get_sfp_port(9)fwnode_mdio_find_device(9)fwnode_phy_find_device(9)phy_probe(9)phy_driver_register(9)
like... the whole net/phy friend group showed up to the party ππ
that's the page bestie!! π§ she lives in ./drivers/net/phy, version dated October 2026, and she's still fwnode_get_phy_node(9) at the end of the day. mwah π go get that phy_node, you got this πβ¨π
π¦ 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