fwnode_typec_switch_get(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… fwnode_typec_switch_get(9) πŸ’…

okay so this is a page from the Kernel API Manual, and bestie, it's short but it matters. Buckle up πŸŽ€


✨ NAME ✨

fwnode_typec_switch_get β€” find the USB Type-C orientation switch πŸ¦‹


🌸 SYNOPSIS 🌸

struct typec_switch * fwnode_typec_switch_get (struct fwnode_handle
*fwnode );

like, it takes one fwnode and hands you back a struct typec_switch *. that's the whole vibe ✨


🫢 ARGUMENTS 🫢

  • fwnode β€” the caller device node. that's it, that's the argument, she's simple and she knows it πŸ’…

πŸ‘‘ DESCRIPTION πŸ‘‘

so what does it do? it finds a switch linked with dev. yep, the manpage says dev right there β€” we don't question it, we just report it fr fr πŸ™ˆ

the return situation is lowkey the whole plot twist:

  • on success, you get a reference to the switch β€” iconic, congrats πŸŽ‰
  • NULL if no matching connection was found β€” no switch, no problem, moving on πŸ’€
  • ERR_PTR(-EPROBE_DEFER) when a connection was found but the switch hasn't been enumerated yet β€” like, she exists but she's not ready, give her a minute 😭 ⏳

πŸ¦‹ SEE ALSO πŸ¦‹

this is the friend group, and they all live in the kernel file ./drivers/usb/typec/mux.c:

switch girlies and mux girlies, we stan both πŸ’–


aaaand that's the page!! 🧚 from ./drivers/usb/typec, dated October 2026, under the Kernel API Manual banner β€” stay hydrated, read your manpages, and remember: EPROBE_DEFER is not a rejection, it's just a "not yet" πŸŒˆπŸ’œ

πŸ“¦ where this page comes from