pm_runtime_idle(9)
β¨ pm_runtime_idle(9) β a Kernel API Manual moment β¨
okay so bestie, we're diving into the Kernel API Manual today and honestly? this one is a lil gem π it's giving "will you please chill out and go to sleep" but for devices. let's get into it π«Ά
π€ NAME π€
pm_runtime_idle β conditionally set up autosuspend of a device or suspend it.
like, conditionally. that word is doing SO much heavy lifting here, keep an eye on it π
π SYNOPSIS π
int pm_runtime_idle (struct device *dev );
one function, one pointer, zero drama β¨
πΈ ARGUMENTS πΈ
devβ the target device. the main character of this whole operation π that's the one we're trying to get to relax.
π¦ DESCRIPTION π¦
so here's the vibe: pm_runtime_idle invokes the "idle check" callback of dev, and then β depending on what that callback hands back to us β it either sets up autosuspend of dev or suspends it. which one? that depends on whether or not autosuspend has been enabled for it. iykyk π
it's like asking your friend "hey are you sleepy?" and the answer decides whether you set an alarm for them or just tuck them in right now π΄
π RETURN π
the numbers bestie, the numbers π
0β Success. slay, we ate π-EINVALβ Runtime PM error.-EACCESβ Runtime PM disabled.-EAGAINβ Runtime PM usage counter non-zero, Runtime PM status change ongoing, or device not inRPM_ACTIVEstate. (yes, three possible reasons, she contains multitudes π« )-EBUSYβ Runtime PMchild_countnon-zero.-EPERMβ Device PM QoS resume latency0.-EINPROGRESSβ Suspend already in progress. it's already happening, bestie, let it cook π₯-ENOSYSβCONFIG_PMnot enabled.
β οΈ note bestie: other values and conditions for the above values are possible as returned by Runtime PM idle and suspend callbacks. so like, don't come for me if you see something else, it's not me it's the callbacks π
π§ SEE ALSO π§
okay this list is LONG and honestly iconic β the whole runtime PM friend group came out for this one ππ Kernel file ./include/linux/pm_runtime.h:
pm_suspend_ignore_children(9)pm_runtime_get_noresume(9)pm_runtime_put_noidle(9)pm_runtime_suspended(9)pm_runtime_active(9)pm_runtime_status_suspended(9)pm_runtime_enabled(9)pm_runtime_blocked(9)pm_runtime_has_no_callbacks(9)pm_runtime_mark_last_busy(9)pm_runtime_is_irq_safe(9)pm_runtime_suspend(9)pm_runtime_autosuspend(9)pm_runtime_resume(9)pm_request_idle(9)pm_request_resume(9)pm_request_autosuspend(9)pm_runtime_get(9)pm_runtime_get_sync(9)pm_runtime_resume_and_get(9)pm_runtime_put(9)__pm_runtime_put_autosuspend(9)pm_runtime_put_autosuspend(9)pm_runtime_put_sync(9)pm_runtime_put_sync_suspend(9)pm_runtime_put_sync_autosuspend(9)pm_runtime_set_active(9)pm_runtime_set_suspended(9)pm_runtime_disable(9)pm_runtime_use_autosuspend(9)pm_runtime_dont_use_autosuspend(9)
and that's the whole page bestie, no cap π«Ά this one lives over in ./include/linux and it's dated October 2026 β see you next time, 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