STRUCT PWRSEQ_DEVICE(9)
π 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 thestruct devicefor 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:
struct pwrseq_unit(9)struct pwrseq_unit_dep(9)struct pwrseq_target(9)struct pwrseq_desc(9)pwrseq_device_register(9)pwrseq_device_unregister(9)devm_pwrseq_device_register(9)pwrseq_device_get_drvdata(9)pwrseq_get(9)pwrseq_put(9)devm_pwrseq_get(9)pwrseq_enable(9)pwrseq_disable(9)pwrseq_to_device(9)
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
- 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