STRUCT MODE_STATE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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