devm_pm_domain_attach_list(9)
π devm_pm_domain_attach_list(9) β from the Kernel API Manual, bestie π
okay so picture this: you're deep in drivers/base/power territory and you need the devres-managed glow-up of attaching to PM domains. that's literally this function. welcome to the group chat. π¦
β¨ NAME β¨
devm_pm_domain_attach_list β the devres-enabled version of dev_pm_domain_attach_list. that's it, that's the whole vibe. lowkey iconic. π
πΈ SYNOPSIS πΈ
int devm_pm_domain_attach_list (struct device *dev , const struct
dev_pm_domain_attach_data *data , struct dev_pm_domain_list **list );
yes bestie, that's the whole signature, copy it exactly, don't @ me. π«Ά
π§ ARGUMENTS π§
devβ the device used to lookup the PM domains for. it's the main character here, fr fr πdataβ the data used for attaching to the PM domains. it's giving "supporting cast energy" but we love her πlistβ an out-parameter with an allocated list of attached PM domains. she's an out-parameter bestie, so she gets written to, not read from. π
β NOTE β
ngl this one's important: this will also handle calling devm_pm_domain_detach_list for you during the remove phase. so you don't gotta do it yourself. it's giving responsible. it's giving "I got you." π«Άβ¨
and then β returns the number of attached PM domains, or a negative error code in case of a failure. so like, if you get a negative number back, that's a π moment, handle it. π
π₯ SEE ALSO π₯
Kernel file ./drivers/base/power/common.c plus the whole friend group:
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)dev_pm_domain_attach_list(9)devm_pm_domain_detach_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 is the kernel file under ./drivers/base/power, and the date on this cutie is October 2026. 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