usb_add_phy(9)
π usb_add_phy β declare the USB PHY π
okay so bestie, this one lives in the Kernel API Manual and it's genuinely such a little icon. let's get into it π«Ά
β¨ SYNOPSIS β¨
int usb_add_phy (struct usb_phy *x , enum usb_phy_type type );
like, that's the whole vibe. two args, one int coming back at you. slay π
π ARGUMENTS π
xβ the USB phy to be used; orNULL. yes,NULLis literally allowed here, no cap πtypeβ the type of this PHY. gotta tell the kernel what kind of PHY it's dealing with, iykyk
πΈ DESCRIPTION πΈ
so here's the tea β β this call is exclusively for use by phy drivers. like, exclusively exclusively. not your call, not my call, phy drivers only, periodt.
and what do those phy drivers do?? they coordinate the activities of drivers for host and peripheral controllers β and in some cases they also handle VBUS current regulation. busy little icons, honestly π
fr fr, "exclusively for use by phy drivers" is not a suggestion. respect the boundary π
π¦ SEE ALSO π¦
Kernel file ./drivers/usb/phy/phy.c β plus this whole friend group right here:
usb_phy_notify_charger_work(9)usb_phy_get_charger_type(9)usb_phy_set_charger_current(9)usb_phy_get_charger_current(9)usb_phy_set_charger_state(9)devm_usb_get_phy(9)usb_get_phy(9)devm_usb_get_phy_by_node(9)devm_usb_get_phy_by_phandle(9)usb_put_phy(9)usb_add_phy_dev(9)usb_remove_phy(9)usb_phy_set_event(9)
and that's the whole page bestie!! π§ this one came from ./drivers/usb/phy and it's dated October 2026 β literally stamped in the future, main character energy tbh βπ
π¦ 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