rpm_idle(9)
π rpm_idle(9) β the kernel API manual, but make it cute β¨
okay so bestie, welcome to rpm_idle(9) from the Kernel API Manual. this is the whole page, no skips, let's get into it π«Ά
πΈ NAME πΈ
rpm_idle β literally just notifies the device bus type if the device can be suspended. that's the whole vibe check π
π SYNOPSIS π
int rpm_idle (struct device *dev , int rpmflags );
π¦ ARGUMENTS π¦
devβ the Device you're notifying the bus type about. main character energy fr.rpmflagsβ Flag bits. yep, just flag bits π
π DESCRIPTION π
so here's the tea β: this checks if the device's runtime PM status even allows it to be suspended. like, is this device in its suspend era or not.
if another idle notification has already been started earlier? return immediately. not me waiting in line behind another idle notification π. just bounce.
if the RPM_ASYNC flag is set then it queues an idle-notification request; otherwise it runs the ->runtime_idle callback directly. ngl that's the whole branch logic right there.
and if the ->runtime_idle callback doesn't exist, or if it returns 0, it calls rpm_suspend with the RPM_AUTO flag. slay, recursive-ish behavior.
β οΈ okay this part is important bestie, do NOT skip: This function must be called under dev->power.lock with interrupts disabled. like, that's the rule, periodt. break it and it's giving undefined chaos π
π₯ SEE ALSO π₯
kernel file ./drivers/base/power/runtime.c β go read it iykyk
and the whole friend group (all of these, 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_suspend(9)rpm_resume(9)pm_runtime_work(9)pm_suspend_timer_fn(9)pm_schedule_suspend(9)__pm_runtime_idle(9)__pm_runtime_suspend(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)
and that's the page bestie π sign-off time: this lil beauty lives in ./drivers/base/power, and it's dated October 2026. iconique. bye πβ¨
π¦ 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