dev_pm_domain_attach_list(9)
π dev_pm_domain_attach_list(9) β Kernel API Manual π
okay so bestie, this is a page from the Kernel API Manual and it's about gluing a device to all its PM domains at once. no cap, it's lowkey iconic.
β¨ NAME β¨
dev_pm_domain_attach_list β associate a device with its PM domains.
like, all of them. at once. main character energy fr.
πΈ SYNOPSIS πΈ
int dev_pm_domain_attach_list (struct device *dev , const struct
dev_pm_domain_attach_data *data , struct dev_pm_domain_list **list );
π¦ ARGUMENTS π¦
devβ the device we're using to look up the PM domains for. it's the one getting attached, basically the it-girl of this whole operation πdataβ the data used for attaching to the PM domains. this is where you tell the function what you want.listβ an out-parameter holding an allocated list of the attached PM domains. yes it's a**, yes it's giving pointer-to-pointer, that's just how it is π«Ά
π DESCRIPTION π
so here's the vibe: this function helps you attach a device to its multiple PM domains. the caller β usually a driver's probe function β can hand over a list of names for the PM domains that we should try to attach the device to.
but plot twist π¬ β the caller can also pass an empty list, and in that case the attach gets done for all of the available PM domains. slay.
β οΈ callers must ensure proper synchronization of this function with power management callbacks. no skipping this one, bestie, it's literally in the spec.
it returns the number of attached PM domains, or a negative error code if something goes wrong π.
and heads up β to detach the list of PM domains, the driver shall call dev_pm_domain_detach_list, typically during the remove phase. don't leave them attached, that's messy π
π₯ SEE ALSO π₯
kernel file ./drivers/base/power/common.c, plus these certified bangers:
dev_pm_get_subsys_data(9)dev_pm_put_subsys_data(9)dev_pm_domain_attach(9)dev_pm_domain_attach_by_id(9)dev_pm_domain_attach_by_name(9)devm_pm_domain_detach_list(9)devm_pm_domain_attach_list(9)dev_pm_domain_detach(9)dev_pm_domain_detach_list(9)dev_pm_domain_start(9)dev_pm_domain_set(9)dev_pm_domain_set_performance_state(9)
and that's the page, bestie!! π§ββοΈ source lives in ./drivers/base/power, dated October 2026, and the page is dev_pm_domain_attach_list(9). go forth and attach responsibly πβ¨π
π¦ 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