STRUCT TYPEC_CABLE_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct typec_cable_ops(9) β€” the Kernel API Manual, bestie edition πŸŽ€

okay so you're in the Kernel API Manual and the main character of this page is struct typec_cable_ops β€” it's literally the Cable alternate mode operations vector. yes queen, a whole vector of cable ops. let's get into it ✨


🌸 NAME 🌸

struct typec_cable_ops β€” the Cable alternate mode operations vector, aka the lil bundle of function pointers your cable's alt mode rolls with πŸ’–


✨ SYNOPSIS ✨

like, here's the whole struct, verbatim, no notes:

struct typec_cable_ops {
    int (*enter)(struct typec_altmode *altmode, enum typec_plug_index
sop, u32 *vdo);
    int (*exit)(struct typec_altmode *altmode, enum typec_plug_index
sop);
    int (*vdm)(struct typec_altmode *altmode, enum typec_plug_index sop,
const u32 hdr, const u32 *vdo, int cnt);
 };

πŸ¦‹ Members πŸ¦‹

bestie these are the three members and they're each kind of iconic in their own way:

  • enter β€” the operations to be executed with the Enter Mode Command 🫢 like, going in.
  • exit β€” the operations to be executed with the Exit Mode Command πŸ’€ like, leaving. no dramatic goodbye tho, it's just a callback.
  • vdm β€” the callback for SVID specific commands πŸ”₯ the SVID-specific one, periodt.

πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group, fr fr β€” go read these too:


🌈 that's the whole page babes, every member, every reference, nothing skipped, iykyk πŸ’œ

k bye ily, this gem lives in ./include/linux/usb and it's dated October 2026 β€” and yes the page itself is signed struct typec_cable_ops(9) because it's that girl πŸ’…πŸŽ€

πŸ“¦ where this page comes from