typec_cable_get(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… typec_cable_get(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual β€” today we're looking at typec_cable_get(9), and it's literally giving β€œget a reference to the USB Type-C cable” energy. iconic. ✨

πŸ’– NAME πŸ’–

typec_cable_get β€” get a reference to the USB Type-C cable. 🫢

⚑ SYNOPSIS ⚑

struct typec_cable * typec_cable_get (struct typec_port *port );

πŸŽ€ ARGUMENTS πŸŽ€

  • port β€” the USB Type-C Port the cable is connected to. πŸ”Œ

✨ DESCRIPTION ✨

okay so here's the important part, no cap: the caller must decrement the reference count with typec_cable_put after use. That's the rule. You get your reference, you do your thing, then you put it back with typec_cable_put when you're done. don't leave it hanging, bestie. πŸ’…πŸ˜­

🌈 SEE ALSO 🌈

the source tea lives in the Kernel file ./drivers/usb/typec/class.c, and here's the whole friend group of related references β€” go read them, iykyk:

mwah πŸ’‹ β€” source/version: ./drivers/usb/typec, dated October 2026. slay.

πŸ“¦ where this page comes from