STRUCT PWRSEQ_UNIT(9)
π struct pwrseq_unit(9) π
okay bestie, welcome to the Kernel API Manual β¨ this one is literally about struct pwrseq_unit(9) β the private power-sequence unit data, no cap. it's giving "backstage pass to the sequencing machinery" energy π
β¨ NAME β¨
struct pwrseq_unit β Private power-sequence unit data. that's it, that's the whole vibe π«Ά it's the little internal unit that holds its own stuff for the power sequencer, iykyk.
πΈ SYNOPSIS πΈ
here's the whole struct, copied exactly so you can eyeball it, bestie:
struct pwrseq_unit {
struct kref ref;
const char *name;
struct list_head list;
struct list_head deps;
pwrseq_power_state_func enable;
pwrseq_power_state_func disable;
unsigned int enable_count;
};
π¦ Members π¦
okay so let's go member by member, no skipping π
refβ Reference count for this object. the moment it drops to0, the object is destroyed. so like, bestie, please keep track of your refs π when it hits zero it's over, periodt.nameβ Name of this target. just the label so you know who's who πlistβ Link to siblings on the list of all units of a single sequencer. it's how all the units of one sequencer hold hands in a list π«Άdepsβ List of units on which this unit depends. the "i need these girlies first" list πenableβ Callback running the part of the power-on sequence provided by this unit. it does this unit's little slice of the power-on choreography β¨disableβ Callback running the part of the power-off sequence provided by this unit. same energy but for power-off, and yes it coordinates the off-sequence πenable_countβ Current number of users that enabled this unit. heads up, those users may be the consumer of the power sequencer or other units that depend on this one. so it's a whole ecosystem fr fr π₯
π SEE ALSO π
go read these next, bestie, they're all connected:
- Kernel file
./drivers/power/sequencing/core.c struct pwrseq_unit_dep(9)struct pwrseq_target(9)struct pwrseq_device(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)
ngl this page came from ./drivers/power/sequencing and it's dated October 2026 β so yeah, that's the source, the version vibe, and the date all in one cute lil sign-off π mwah, go forth and sequence your power, icon π§ββοΈπ
π¦ 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