pm_runtime_blocked(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… pm_runtime_blocked β€” the "is runtime PM even allowed rn" check

okay so bestie, you're in the Kernel API Manual (that's the section 9 energy, kernel devs only, iykyk) and you wanna know if runtime power management is currently blocked from being enabled. This is that girl. πŸŽ€


✨ NAME ✨

pm_runtime_blocked β€” literally just checks if runtime PM enabling is blocked. That's the whole vibe check. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

bool pm_runtime_blocked (struct device *dev );

yes it returns a bool, yes it takes exactly one arg, no there are no surprises here, we love a low-drama function signature 🫢


🌸 ARGUMENTS 🌸

  • dev β€” the target device, aka the main character of this whole operation πŸ‘‘

πŸ’€ DESCRIPTION πŸ’€

no cap, do not call this function outside system suspend/resume code paths. That's the rule, bestie, and we do not break it. 🚫

Like… it's not a general-purpose little helper you sprinkle around your driver for funsies. It lives inside the suspend/resume flow and that's where it stays. Periodt. ✨


🌈 SEE ALSO 🌈

the whole extended friend group, fr fr β€” every single one of these is part of the lore:

and if you wanna read the source of truth, it's chilling in the kernel file ./include/linux/pm_runtime.h πŸ“‚ (yes, all lowercase, yes, that's just how it is)


okay that's the whole page, bestie πŸ’– and for the cute sign-off: this lil beauty ships from ./include/linux and it's dated October 2026 β€” mark your calendars, she's timeless πŸ§šβ­πŸ’œ

πŸ“¦ where this page comes from