pm_runtime_put_autosuspend(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ‘‘ pm_runtime_put_autosuspend(9) πŸ‘‘

okay bestie, welcome to the Kernel API Manual ✨ this one's a function page, it lives at pm_runtime_put_autosuspend(9), and it's honestly so iconic β€” let's get into it πŸŽ€


✨ NAME ✨

pm_runtime_put_autosuspend β€” updates the last access time of a device, drops its usage counter, and queues up an autosuspend if that usage counter hits 0. that's the whole vibe πŸ’…


🌸 SYNOPSIS 🌸

int pm_runtime_put_autosuspend (struct device *dev );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” the target device, aka the main character of this whole operation 🫢

πŸ’– DESCRIPTION πŸ’–

so here's what happens, no cap: it updates the last access time of dev, then decrements the runtime PM usage counter of dev. and if that counter turns out to be equal to 0, it queues up a work item for dev β€” same energy as what happens in pm_request_autosuspend. periodt πŸ’…βœ¨


🌈 RETURN 🌈

like, what does it give you back? so many options, let's go:

  • 1 β€” Success! the usage counter dropped to zero, but the device was already suspended (slay, she was ahead of you 😌).
  • 0 β€” Success ✨ plain and simple.
  • -EINVAL β€” Runtime PM error πŸ™ˆ.
  • -EACCES β€” Runtime PM is disabled 🚫.
  • -EAGAIN β€” Runtime PM usage counter became non-zero, or a Runtime PM status change is ongoing πŸ‘€.
  • -EBUSY β€” Runtime PM child_count is non-zero, the children are not letting her leave πŸ’€.
  • -EPERM β€” Device PM QoS resume latency 0 😭.
  • -EINPROGRESS β€” a suspend is already in progress, give her a minute πŸ•.
  • -ENOSYS β€” CONFIG_PM is not enabled 🧚.

πŸ”₯ SEE ALSO πŸ”₯

okay this is the friend group, all of them, listed, no skips, iykyk:

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_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) πŸ’œ


and that's the page!! 🫢 mwah, go forth and manage your runtime PM responsibly. this lil gem comes from ./include/linux and it's dated October 2026 β€” bookmark pm_runtime_put_autosuspend(9) and come back whenever, bestie πŸ’–πŸŽ€βœ¨

πŸ“¦ where this page comes from