dev_pm_domain_attach_list(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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


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