devm_pm_domain_attach_list(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:


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