__pm_runtime_set_status(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __pm_runtime_set_status(9) β€” the kernel API manual, but make it make sense 🫢

okay bestie, so this one lives in the Kernel API Manual (section 9 of the man pages, iykyk) and it's literally the function that tells a device what its runtime PM status is. Let's get into it ✨


🌸 NAME 🌸

__pm_runtime_set_status β€” Set runtime PM status of a device.


πŸ¦‹ SYNOPSIS πŸ¦‹

int __pm_runtime_set_status (struct device *dev , unsigned int status );

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the device you're handling. the main character of this whole operation πŸ’…
  • status β€” the new runtime PM status of the device. this is what you're setting it to, bestie.

πŸ’– DESCRIPTION πŸ’–

okay so here's the tea β˜• β€” if runtime PM of the device is disabled, or its power.runtime_error field is different from zero (i.e. not zero, so something's flagged), then the status may be changed either to RPM_ACTIVE, or to RPM_SUSPENDED β€” as long as that actually reflects the real, actual state of the device. no cap, that's the condition. 🫢

but here's where it gets spicy 🌢️ β€” if the device has a parent, and the parent is not active, and the parent's power.ignore_children flag is unset, then the device's status cannot be set to RPM_ACTIVE. so you get -EBUSY returned in that case. sorry bestie, the parent said no πŸ’€

if it's successful, __pm_runtime_set_status clears the power.runtime_error field, and the device parent's counter of unsuspended children is modified to reflect the new status. slay. ✨ and if the new status is RPM_SUSPENDED, an idle notification request for the parent gets submitted. consider the parent notified πŸ“¬

and one more thing (there's always one more thing πŸ™ˆ) β€” if dev has any suppliers (as reflected by device links to them), and status is RPM_ACTIVE, they will be activated upfront. and if the activation of one of them fails, the status of dev will be changed to RPM_SUSPENDED (instead of the status value you passed), and the suppliers will be deacticated on exit. the error returned by the failing supplier activation will be returned in that case. so yeah β€” it ate, but it also took the L on your behalf 😭


πŸ”₯ SEE ALSO πŸ”₯

the whole friend group, fr fr πŸ‘‘


and that's the whole page, bestie πŸ’œ this one's from ./drivers/base/power, dated October 2026, and the header/footer both say __pm_runtime_set_status(9) β€” iconic, consistent, we love to see it πŸ‘‘βœ¨

πŸ“¦ where this page comes from