STRUCT MODE_STATE(9)
β¨ struct mode_state(9) β¨
okay so this is a page from the Kernel API Manual, and bestie, it's literally all about struct mode_state β the little vibe-tracker that keeps tabs on one specific Type-C alternate mode π
like it's the mode's personal hype-manager, remembering everything about it.
πΈ NAME πΈ
struct mode_state β state tracking for a specific Type-C alternate mode π¦
π SYNOPSIS π
struct mode_state {
u16 svid;
u8 priority;
int error;
struct list_head list;
};
π Members π
svidβ the Standard or Vendor ID of the Alternate Mode π no cap, this is how we know which mode we're talking about.priorityβ the Mode priority β like, how much this mode matters compared to the others. main character ranking energy.errorβ the outcome of the last attempt to enter the mode π so if entering flopped, this is where the receipts live.listβ a list head to link this mode state into a prioritized list π it's giving group-chat member list, but sorted by priority.
π SEE ALSO π
Kernel file ./drivers/usb/typec/mode_selection.c struct
mode_selection(9), struct mode_order(9), mode_selection_work_fn(9) β go read these too, iykyk π«Ά
fr fr, don't skip the SEE ALSO section, that's where the whole friend group lives π
and that's the whole page, bestie π this came from the kernel source tree at ./drivers/usb/typec, dated October 2026 β so like, future vibes only πβ¨ periodt π
π¦ 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