__pm_runtime_suspend(9)
π€ __pm_runtime_suspend(9) β like, the runtime-PM girlies' entry point π
okay bestie, welcome to the Kernel API Manual β¨ this one's from the kernel's runtime power management corner of the world and it's genuinely so useful once it clicks, i promise π«Ά
πΈ SYNOPSIS πΈ
int __pm_runtime_suspend (struct device *dev , int rpmflags );
π ARGUMENTS π
devβ the device we're putting to sleep π΄ like, this is the one catching Zs.rpmflagsβ the flag bits, aka the lil switches that change how this whole thing goes down.
π DESCRIPTION π
okay so here's the tea β β this is the entry point for runtime put/suspend operations, and the way it works is genuinely so clean:
if the RPM_GET_PUT flag is set, we decrement the device's usage count, and if it's still larger than zero we just return immediately, no notes, bye π. but if it goes negative? π¨ that's a vibe violation β it logs a warning, increments it back, and returns an error. we do NOT let the counter go rogue, periodt.
after all that, it carries out a suspend β and that suspend can be synchronous or asynchronous, whichever one applies. β¨
real talk though: this routine may be called in atomic context if theRPM_ASYNCflag is set, or ifpm_runtime_irq_safehas been called. literally keep that in mind, it's not a drill π
π¦ SEE ALSO π¦
kernel file ./drivers/base/power/runtime.c β the source of truth, go read her π
and the whole extended fam, no cap, every single one:
update_pm_runtime_accounting(9)pm_runtime_deactivate_timer(9)pm_runtime_cancel_pending(9)rpm_check_suspend_allowed(9)pm_runtime_release_supplier(9)__rpm_callback(9)rpm_callback(9)rpm_idle(9)rpm_suspend(9)rpm_resume(9)pm_runtime_work(9)pm_suspend_timer_fn(9)pm_schedule_suspend(9)__pm_runtime_idle(9)__pm_runtime_resume(9)pm_runtime_get_conditional(9)pm_runtime_get_if_active(9)pm_runtime_get_if_in_use(9)__pm_runtime_set_status(9)__pm_runtime_barrier(9)pm_runtime_barrier(9)pm_runtime_enable(9)devm_pm_runtime_set_active_enabled(9)devm_pm_runtime_enable(9)devm_pm_runtime_get_noresume(9)pm_runtime_forbid(9)pm_runtime_allow(9)pm_runtime_no_callbacks(9)pm_runtime_irq_safe(9)update_autosuspend(9)pm_runtime_set_autosuspend_delay(9)__pm_runtime_use_autosuspend(9)pm_runtime_init(9)pm_runtime_reinit(9)pm_runtime_remove(9)pm_runtime_get_suppliers(9)pm_runtime_put_suppliers(9)pm_runtime_drop_link(9)pm_runtime_force_suspend(9)pm_runtime_force_resume(9)
mwah π this page lives under ./drivers/base/power, dated October 2026, and yes the title up top is still __pm_runtime_suspend(9) because we respect the brand π go forth and suspend responsibly bestie πβ
π¦ 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