rpm_resume(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’€ rpm_resume(9) β€” like, the runtime-resume glow-up for a device ✨

okay so first things first, bestie: this is a page from the Kernel API Manual, and the star of the show is rpm_resume β€” yes, that one πŸ’…


🌸 NAME 🌸

rpm_resume β€” Carry out runtime resume of given device. that's it, that's the whole job, and she does it flawlessly 🫢


✨ SYNOPSIS ✨

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

like, two args, one int back, no drama πŸ’–


πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” Device to resume. the main character of this whole operation πŸ‘‘
  • rpmflags β€” Flag bits. cute little switches that change how she behaves, iykyk

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so here's the vibe check πŸ‘€ β€” first thing she does is check if the device's runtime PM status allows it to be resumed. Like, is the door even unlocked, babe?

Then she cancels any scheduled or pending requests. bye, previous plans 🫢

Now, the messy part (and there's always a messy part 😭):

  • If another resume has been started earlier, she'll either return immediately or wait for it to finish β€” and which one happens depends on the RPM_NOWAIT and RPM_ASYNC flags. pick your fighter πŸ’…
  • Similarly, if there's a suspend running in parallel with this function, she'll either tell the other process to resume after suspending (that's the deferred_resume situation, no cap) or wait for it to finish. zero chaos tolerated ✨

Then, the fork in the road: if the RPM_ASYNC flag is set, she queues a resume request. Otherwise, she runs the ->runtime_resume callback directly. direct action, main character energy πŸ”₯

And finally β€” the reward β€” she queues an idle notification for the device if the resume succeeded. slay, notification queued, everybody clap πŸ‘

⚠️ okay listen, this part is NON-NEGOTIABLE bestie: this function must be called under dev->power.lock with interrupts disabled. must. not "should". must. don't come crying to me if you skip it πŸ’€

🌈 SEE ALSO 🌈

the whole friend group, fr fr β€” everyone she hangs with:


and that's the whole page, bestie β€” go forth and resume responsibly πŸŒΈπŸ¦‹πŸ’œ

mwah πŸ’‹ this came out of ./drivers/base/power, dated October 2026 β€” catch you in the next one, bestie πŸŽ€βœ¨

πŸ“¦ where this page comes from