fwnode_typec_switch_get(9)
π 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 π
NULLif 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:
typec_switch_put(9)typec_switch_register(9)typec_switch_unregister(9)fwnode_typec_mux_get(9)typec_mux_put(9)typec_mux_register(9)typec_mux_unregister(9)
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
- 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