rpm_resume(9)
π€ 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_NOWAITandRPM_ASYNCflags. 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_resumesituation, 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:
- Kernel file
./drivers/base/power/runtime.cβ the source, go read it, it's giving lore π update_pm_runtime_accounting(9)pm_runtime_deactivate_timer(9)pm_runtime_cancel_pending(9)rpm_check_suspend_allowed(9)pm_runtime_release_supplier(9)__rpm_callback(9)rpm_callback(9)rpm_idle(9)rpm_suspend(9)pm_runtime_work(9)pm_suspend_timer_fn(9)pm_schedule_suspend(9)__pm_runtime_idle(9)__pm_runtime_suspend(9)__pm_runtime_resume(9)pm_runtime_get_conditional(9)pm_runtime_get_if_active(9)pm_runtime_get_if_in_use(9)__pm_runtime_set_status(9)__pm_runtime_barrier(9)pm_runtime_barrier(9)pm_runtime_enable(9)devm_pm_runtime_set_active_enabled(9)devm_pm_runtime_enable(9)devm_pm_runtime_get_noresume(9)pm_runtime_forbid(9)pm_runtime_allow(9)pm_runtime_no_callbacks(9)pm_runtime_irq_safe(9)update_autosuspend(9)pm_runtime_set_autosuspend_delay(9)__pm_runtime_use_autosuspend(9)pm_runtime_init(9)pm_runtime_reinit(9)pm_runtime_remove(9)pm_runtime_get_suppliers(9)pm_runtime_put_suppliers(9)pm_runtime_drop_link(9)pm_runtime_force_suspend(9)pm_runtime_force_resume(9)
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
- 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