dev_pm_domain_detach(9)
π dev_pm_domain_detach β the kernel API manual, bestie edition β¨
okay so you found dev_pm_domain_detach, the little function in the kernel API manual that's literally the "we're breaking up" text to a device's PM domain. sit down, grab a strawberry π, and let's get into it.
β¨ NAME β¨
dev_pm_domain_detach β Detach a device from its PM domain. that's it, that's the whole vibe. π¦
πΈ SYNOPSIS πΈ
void dev_pm_domain_detach (struct device *dev , bool power_off );
returns nothing (void, she gives nothing and expects nothing back π
), and it takes a device plus a bool. iconic signature tbh.
π ARGUMENTS π
devβ Device to detach. the main character of this whole operation πpower_offβ Used to indicate whether we should power off the device. yes bestie, it's a flag, and it does exactly what it says on the tin β¨
π¦ DESCRIPTION π¦
so this function will reverse the actions from dev_pm_domain_attach, dev_pm_domain_attach_by_id and dev_pm_domain_attach_by_name, thus it detaches dev from its PM domain. it's giving "undo button but make it power management" π
typically it should be invoked during the remove phase, either from subsystem level code or from drivers. so like, cleanup era. the farewell tour. π
β οΈ ok real talk for a sec, bestie β callers must ensure proper synchronization of this function with power management callbacks. no cap, don't be sloppy about this one, fr fr.
π SEE ALSO π
- Kernel file
./drivers/base/power/common.c 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)devm_pm_domain_attach_list(9)dev_pm_domain_detach_list(9)dev_pm_domain_start(9)dev_pm_domain_set(9)dev_pm_domain_set_performance_state(9)
like, read the whole friend group, they all ate honestly π«Ά
and that's the page! π§ this one's from the ./drivers/base/power corner of the kernel, dated October 2026, living under the Kernel API Manual umbrella. stay synced, stay detached, mwah ππ₯
π¦ 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