STRUCT TYPEC_CABLE_OPS(9)
π 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:
- Kernel file
./include/linux/usb/typec_altmode.h struct typec_altmode(9)struct typec_altmode_ops(9)typec_altmode_get_cable_svdm_version(9)typec_altmode_get_orientation(9)typec_altmode_get_svdm_version(9)typec_altmode_get_data_role(9)struct typec_altmode_driver(9)typec_altmode_register_driver(9)typec_altmode_unregister_driver(9)typec_mode_selection_start(9)typec_altmode_state_update(9)typec_mode_selection_delete(9)
π 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
- 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