__pm_runtime..._autosuspend(9)
π¦ __pm_runtime..._autosuspend β a Kernel API Manual moment π
okay so bestie, welcome to the kernel API manual, this one's about __pm_runtime..._autosuspend and honestly it's giving "one tiny function, whole lot of lore" β¨
πΈ NAME πΈ
__pm_runtime_put_autosuspend β drop the device usage counter and, if it hits 0, queue up an autosuspend. that's the whole vibe π
β¨ SYNOPSIS β¨
int __pm_runtime_put_autosuspend (struct device *dev );
π«Ά ARGUMENTS π«Ά
devβ the target device. the main character of this whole operation π
π DESCRIPTION π
so what it does: it decrements the runtime PM usage counter on dev, and if that counter turns out to be equal to 0, it queues up a work item for dev β exactly like in pm_request_autosuspend. no cap, that's it. lowkey elegant π§
π₯ RETURN π₯
1β success! π the usage counter dropped to zero, but the device was already suspended. so like, mission accomplished, nobody had to do anything.0β success. periodt.-EINVALβ runtime PM error π-EACCESβ runtime PM is disabled π-EAGAINβ the runtime PM usage counter became non-zero, or a runtime PM status change is ongoing. awkward π-EBUSYβ the runtime PMchild_countis non-zero. the children said "not today" π-EPERMβ device PM QoS resume latency is0.-EINPROGRESSβ a suspend is already in progress, bestie, hold please β³-ENOSYSβCONFIG_PMisn't enabled. so the function is literally not a thing here π
π SEE ALSO π
kernel file ./include/linux/pm_runtime.h, plus the whole friend group π«Ά:
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_idle(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_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)
ngl the ... in the title is doing a lot of heavy lifting, but that's the page name and we respect it π
okay that's the whole read, mwah π this page lives in ./include/linux and it's dated October 2026 β iykyk, 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