dev_pm_genpd_set_hwmode(9)
π dev_pm_genpd_set_hwmode(9) π
okay so bestie, welcome to the Kernel API Manual β yes, that manual, the one with all the genpd lore. this page is about dev_pm_genpd_set_hwmode, and it's honestly a little sleeper hit, so let's get into it π
β¨ NAME β¨
dev_pm_genpd_set_hwmode β set the HW mode for the device and its PM domain. both of them. together. slay π«Ά
πΈ SYNOPSIS πΈ
int dev_pm_genpd_set_hwmode (struct device *dev , bool enable );
π ARGUMENTS π
devβ theDevicewhose HW-mode is getting changed. it's the main character of this call, no cap πenableβ the value that sets or unsets the HW-mode. that's it. that's the whole vibe check π¦
π DESCRIPTION π
so here's the tea: some PM domains can legitimately just rely on HW signals to control the power for a device. iconic behavior tbh β‘
and because a consumer driver might want to switch the behaviour for its device at runtime β which, lowkey, can be a whole win from a latency or energy point of view β it can call this function. yes, this exact one. you found it π―
β οΈ okay important one, don't skip this: it is assumed that the users guarantee that the genpd wouldn't be detached while this routine is getting called. that's on you, bestie. keep that domain alive, fr fr π
π₯ RETURN π₯
returns 0 on success, and negative error values on failures. that's the whole deal β¨
π¦ SEE ALSO π¦
first up, the source of truth, the actual file:
- Kernel file
./drivers/pmdomain/core.cπ
and now the extended genpd family reunion β every single one of them, because we don't do half-finished lists here π
dev_pm_genpd_set_performance_state(9)dev_pm_genpd_set_next_wakeup(9)dev_pm_genpd_get_next_hrtimer(9)dev_pm_genpd_get_hwmode(9)dev_pm_genpd_rpm_always_on(9)dev_pm_genpd_is_on(9)pm_genpd_inc_rejected(9)genpd_queue_power_off_work(9)genpd_power_off(9)genpd_power_on(9)genpd_power_off_work_fn(9)__genpd_runtime_suspend(9)__genpd_runtime_resume(9)genpd_runtime_suspend(9)genpd_runtime_resume(9)genpd_power_off_unused(9)genpd_sync_power_off(9)genpd_sync_power_on(9)genpd_prepare(9)genpd_finish_suspend(9)genpd_suspend_noirq(9)genpd_finish_resume(9)genpd_resume_noirq(9)genpd_freeze_noirq(9)genpd_thaw_noirq(9)genpd_poweroff_noirq(9)genpd_restore_noirq(9)genpd_complete(9)dev_pm_genpd_suspend(9)dev_pm_genpd_resume(9)pm_genpd_add_device(9)pm_genpd_remove_device(9)dev_pm_genpd_add_notifier(9)dev_pm_genpd_remove_notifier(9)pm_genpd_add_subdomain(9)pm_genpd_remove_subdomain(9)pm_genpd_init(9)pm_genpd_remove(9)struct of_genpd_provider(9)genpd_xlate_simple(9)genpd_xlate_onecell(9)genpd_add_provider(9)of_genpd_add_provider_simple(9)of_genpd_add_provider_onecell(9)of_genpd_del_provider(9)genpd_get_from_provider(9)of_genpd_add_child_ids(9)of_genpd_remove_child_ids(9)of_genpd_add_device(9)of_genpd_add_subdomain(9)of_genpd_remove_subdomain(9)of_genpd_remove_last(9)genpd_dev_pm_detach(9)genpd_dev_pm_attach(9)genpd_dev_pm_attach_by_id(9)genpd_dev_pm_attach_by_name(9)of_genpd_parse_idle_states(9)of_genpd_sync_state(9)
like, the way that list just keeps going. main character energy from the entire power domain subsystem, honestly π
that's the page, bestie!! π«Ά sourced straight from ./drivers/pmdomain and dated October 2026, manual name and all β go forth and toggle that HW mode 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