typec_register_plug(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… typec_register_plug(9) β€” like, the Kernel API Manual page, bestie

okay so picture this: it's the Linux kernel, it's the Kernel API Manual, and the function we're obsessing over today is typec_register_plug(9). yes that's a 9 in the parens, that means kernel API, we don't make the rules πŸŽ€


✨ NAME ✨

typec_register_plug β€” register a USB Type-C Cable Plug. that's it, that's the whole vibe. πŸ¦‹


🌸 SYNOPSIS 🌸

struct typec_plug * typec_register_plug (struct typec_cable *cable ,
struct typec_plug_desc *desc );

two arguments, one cute little struct pointer coming back at you. slay. πŸ’–


πŸŽ€ ARGUMENTS πŸŽ€

  • cable β€” the USB Type-C Cable that's got the plug on it. like, the plug's home cable, its main character context, yk?
  • desc β€” the description of the cable plug. this is where you tell everyone what this plug actually is. ✨

πŸ‘‘ DESCRIPTION πŸ‘‘

so this is the whole point of the page: typec_register_plug registers a device for the USB Type-C Cable Plug that's described in desc. 🫢

now, a USB Type-C Cable Plug represents a plug with electronics in it that can respond to USB Power Delivery SOP Prime or SOP Double Prime packages. like β€” it's not just a dumb chunk of metal, it's got chips, it's got opinions, it's got SOP Prime and SOP Double Prime energy going on. iykyk. ⚑

on success you get a handle to the cable plug back. on failure you get an ERR_PTR. which is the kernel way of being like "no πŸ’€". check that thing, fr fr.


🌈 SEE ALSO 🌈

the reading list. the whole extended universe. grab a snack, this is a long one πŸ“

like i said. extended universe. πŸ”₯


and that's the page!! 🧚 this little beauty lives over in ./drivers/usb/typec, it's dated October 2026, and yeah β€” it's typec_register_plug(9), we've been through this πŸ’œ go register a plug, you absolute icon. mwah. 😭🫢

πŸ“¦ where this page comes from