STRUCT DEV_PM_DOMAIN(9)
π struct dev_pm_domain(9) β aka the kernel API manual, but make it make sense π
okay bestie, so this one's from the kernel API manual and it's literally all about struct dev_pm_domain β the power management domain representation. yes, that's a whole thing and yes, you're gonna get it. sit down, hydrate, let's go β¨
πΈ NAME πΈ
struct dev_pm_domain β power management domain representation. that's it, that's the vibe. it's a struct that represents a PM domain. periodt π
π¦ SYNOPSIS π¦
like, this is the shape of it, no cap. copy it exactly how it is, don't freestyle:
struct dev_pm_domain {
struct dev_pm_ops ops;
int (*start)(struct device *dev);
void (*detach)(struct device *dev, bool power_off);
int (*activate)(struct device *dev);
void (*sync)(struct device *dev);
void (*dismiss)(struct device *dev);
int (*set_performance_state)(struct device *dev, unsigned int state);
};
look at all those function pointers. she's got range π
β¨ Members β¨
okay so here's the cast of characters, and honestly each one is a main character in their own right:
opsβ the power management operations tied to this domain. the whole ops situation. it's givingstruct dev_pm_opsenergy, iykyk π«Άstartβ gets called when a user needs to start the device via the domain. like, the user wants the device going, and the domain handles the starting. iconic.detachβ called when you're removing a device from the domain. bye bestie π it takesstruct device *devand abool power_off, so it knows which device and whether to power it off.activateβ this one fires before the probe routines run for bus types and drivers. so it's the pre-game. the warm-up. the hype moment before the actual probe πsyncβ called after a successful driver probe. so the probe said slay and thensyncshows up to align everything. πdismissβ called after an unsuccessful driver probe, and also after driver removal. so when things don't work out, or when the driver leaves,dismissis there. π nothing but respect for her.set_performance_stateβ called to request a new performance state. signature isint (*set_performance_state)(struct device *dev, unsigned int state);β you pass the device and theunsigned int stateyou want. very much a "make it faster/slower please" request π₯
π Description π
so here's the tea: power domains hand you callbacks that get executed during system suspend, hibernation, system resume, and during runtime PM transitions β and they run instead of the subsystem-level and driver-level callbacks. not alongside. instead. that's the whole point, and it's honestly kind of a serve π
π SEE ALSO π
go look at these if you want the full lore:
- the kernel file
./include/linux/pm.h struct dev_pm_ops(9)
β οΈ friendly reminder bestie: keep every name, path and signature exactly as written β no renaming, no "improving", no vibes-based refactoring. the kernel does not accept your creative choices π
and that's the page! π source-wise it lives under ./include/linux, dated October 2026, and it's the struct dev_pm_domain(9) page. mwah, go forth and manage those power domains π§ββοΈβπ
π¦ 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