pm_runtime_put_sync(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– pm_runtime_put_sync(9) πŸ’–

Okay bestie, welcome to the Kernel API Manual, specifically the page for pm_runtime_put_sync(9). This is the function you call when you want to drop a device's usage counter and maybe let it go idle. Let's get into it, no cap.

✨ NAME ✨

pm_runtime_put_sync β€” Drop device usage counter and run "idle check" if 0. That's literally the whole vibe. Periodt.

🌸 SYNOPSIS 🌸

int pm_runtime_put_sync (struct device *dev );

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” Target device. The main character. The device you're doing runtime PM on. iykyk

πŸ¦‹ DESCRIPTION πŸ¦‹

So the way this works: you call pm_runtime_put_sync and it decrements the runtime PM usage counter of dev. If that counter turns out to be equal to 0, it invokes the "idle check" callback of dev and, depending on its return value, sets up autosuspend of dev or suspends it (depending on whether or not autosuspend has been enabled for it).

The runtime PM usage counter of dev remains decremented in all cases, even if it returns an error code. So like, no take-backs. The counter stays dropped. Slay.

πŸ’… RETURN πŸ’…

  • 1 β€” Success. Usage counter dropped to zero, but device was already suspended. It's giving "already chilling" energy. Obsessed.
  • 0 β€” Success. Plain and simple. Slay.
  • -EINVAL β€” Runtime PM error. Something's off.
  • -EACCES β€” Runtime PM disabled. Not today.
  • -EAGAIN β€” Runtime PM usage counter became non-zero or Runtime PM status change ongoing. Try again later vibes.
  • -EBUSY β€” Runtime PM child_count non-zero. It's busy with its kids, okay?
  • -EPERM β€” Device PM QoS resume latency 0. That's the whole note.
  • -ENOSYS β€” CONFIG_PM not enabled. Other values and conditions for the above values are possible as returned by Runtime PM suspend callbacks. The config said no, bestie.

🌈 SEE ALSO 🌈

Kernel file ./include/linux/pm_runtime.h β€” and honestly a whole friend group of functions. Let's list them all because we're thorough bestie:


Cute sign-off: this page lives in ./include/linux and the date on it is October 2026. Also the manual page name is pm_runtime_put_sync(9) just so you know. Bye bestie! πŸ’–βœ¨πŸ«Ά

πŸ“¦ where this page comes from