pm_runtime_disable(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… pm_runtime_disable β€” like, the Kernel API Manual, section 9, bestie

okay so welcome to pm_runtime_disable(9), the page where we learn how to tell the runtime PM framework to please stop touching this device for a sec 🫢 no cap, it's short, it's iconic, let's go.

✨ NAME ✨

pm_runtime_disable β€” Disable runtime PM for a device. periodt. that's the whole vibe.

🌸 SYNOPSIS 🌸

void pm_runtime_disable (struct device *dev );

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” Target device. the main character of this whole operation πŸ’–

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea β˜•: this function prevents the runtime PM framework from working with dev by incrementing its "disable" counter. literally just bumping a number. lowkey elegant.

Now the spicy part 🌈 β€” if the counter is zero when this function runs and there is a pending runtime resume request for dev, it will be resumed. yes, it wakes up first. and if the counter is still zero at that point, all of the pending runtime PM requests for dev will be canceled and all runtime PM operations in progress involving it will be waited for to complete. so it drains the queue and waits for the in-flight stuff to finish. ngl, that's the responsible thing to do πŸ’…

⚠️ okay important, bestie, don't skip this: for each invocation of this function for dev, there must be a matching pm_runtime_enable call, so that runtime PM is eventually enabled for it again. it's a counter, not a boolean β€” one disable per enable, fr fr. miss one and runtime PM for that device is stuck in the shadow realm πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./include/linux/pm_runtime.h β€” plus the whole friend group, which is honestly huge, so buckle up πŸ“:


and that's the page, bestie 🧚 from the ./include/linux corner of the world, dated October 2026 β€” go forth, increment your counters responsibly, and remember: every disable needs its enable πŸ’œβœ¨

πŸ“¦ where this page comes from