usb_get_phy(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– usb_get_phy(9) πŸ’–

okay so welcome to the Kernel API Manual bestie, this is the page for usb_get_phy(9) and we're gonna get you so comfy with it 🫢


✨ NAME ✨

usb_get_phy β€” find the USB PHY πŸ’…


✨ SYNOPSIS ✨

struct usb_phy * usb_get_phy (enum usb_phy_type type );

✨ ARGUMENTS ✨

  • type β€” the type of the phy that the controller requires. that's the whole vibe check right there, you tell it what kind you need and it goes looking πŸ”

✨ DESCRIPTION ✨

okay so here's the tea β˜• β€” this one returns the phy driver, but only after getting a refcount to it. yes, refcount. she's counting her references, as she should πŸ‘‘

and if there's no such phy? you get -ENODEV back. no phy, no problem, just an error code, don't take it personally 😭 literally just means it wasn't there.

⚠️ real talk though: the caller is responsible for calling usb_put_phy to release that count. that refcount is yours now. you asked for it, you clean it up. no cap, don't just leave it hanging πŸ’€

this whole thing is for use by USB host and peripheral drivers β€” that's the crowd this is for, iykyk 🌸


✨ SEE ALSO ✨


and that's the page!! πŸŽ€ this lil cutie lives over in ./drivers/usb/phy and she's dated October 2026 β€” iconic, timeless, main character energy fr fr. mwah, go release your refcounts πŸ’‹πŸ’–

πŸ“¦ where this page comes from