__pm_runtime_suspend(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’€ __pm_runtime_suspend(9) β€” like, the runtime-PM girlies' entry point πŸ’…

okay bestie, welcome to the Kernel API Manual ✨ this one's from the kernel's runtime power management corner of the world and it's genuinely so useful once it clicks, i promise 🫢


🌸 SYNOPSIS 🌸

int __pm_runtime_suspend (struct device *dev , int rpmflags );

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the device we're putting to sleep 😴 like, this is the one catching Zs.
  • rpmflags β€” the flag bits, aka the lil switches that change how this whole thing goes down.

πŸ’– DESCRIPTION πŸ’–

okay so here's the tea β˜• β€” this is the entry point for runtime put/suspend operations, and the way it works is genuinely so clean:

if the RPM_GET_PUT flag is set, we decrement the device's usage count, and if it's still larger than zero we just return immediately, no notes, bye πŸ‘‹. but if it goes negative? 🚨 that's a vibe violation β€” it logs a warning, increments it back, and returns an error. we do NOT let the counter go rogue, periodt.

after all that, it carries out a suspend β€” and that suspend can be synchronous or asynchronous, whichever one applies. ✨

real talk though: this routine may be called in atomic context if the RPM_ASYNC flag is set, or if pm_runtime_irq_safe has been called. literally keep that in mind, it's not a drill 😭

πŸ¦‹ SEE ALSO πŸ¦‹

kernel file ./drivers/base/power/runtime.c β€” the source of truth, go read her πŸ’œ

and the whole extended fam, no cap, every single one:


mwah πŸ’‹ this page lives under ./drivers/base/power, dated October 2026, and yes the title up top is still __pm_runtime_suspend(9) because we respect the brand πŸ‘‘ go forth and suspend responsibly bestie 🌈⭐

πŸ“¦ where this page comes from