STRUCT PWRSEQ_DEVICE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ struct pwrseq_device(9) β€” Kernel API Manual πŸŽ€

🌸 NAME 🌸

struct pwrseq_device β€” private power sequencing data. That's the whole vibe, bestie: it's the private little data bundle for power sequencing.


✨ SYNOPSIS ✨

Okay so here's the actual shape of it, no cap:

struct pwrseq_device {
    struct device dev;
    int id;
    struct module *owner;
    struct rw_semaphore rw_lock;
    struct mutex state_lock;
    pwrseq_match_func match;
    struct list_head targets;
    struct list_head units;
};

🧚 Members 🧚

These are the fields, bestie β€” every single one is doing a job:

  • dev β€” the device struct associated with this sequencer. It's literally the struct device for this sequencer.
  • id β€” the device ID. Short, sweet, iconic.
  • owner β€” prevents removal of active power sequencing providers. It's the bouncer keeping active providers from getting yeeted.
  • rw_lock β€” protects the device from being unregistered while it's in use. Like a lil' "do not disturb" sign while someone's using it.
  • state_lock β€” prevents multiple users from running the power sequence at the same time. One at a time, bestie, no chaotic parallel sequence energy.
  • match β€” the power sequencer matching callback. It's the callback that does the matching, periodt.
  • targets β€” list of targets exposed by this sequencer. A whole list of targets, exposed.
  • units β€” list of all units supported by this sequencer. Every single unit this sequencer supports lives here.

πŸ‘€ SEE ALSO πŸ‘€

Kernel file ./drivers/power/sequencing/core.c is the main character here. Also go peek at all of these, iykyk:


Bye bestie πŸ’… β€” source/version: ./drivers/power/sequencing Β· date: October 2026 Β· manual: struct pwrseq_device(9). Go sequence those powers safely 🫢✨

πŸ“¦ where this page comes from