pm_runtime_get_sync(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, welcome to the pm_runtime_get_sync(9) page from the Kernel API Manual πŸ’…βœ¨ this is the one that bumps a device's runtime PM usage counter and wakes it up synchronously β€” like tapping your fave on the shoulder and being like β€œhi, you're needed rn” 🫢

πŸ’– NAME πŸ’–

pm_runtime_get_sync β€” bump up the usage counter of a device and resume it. That's the whole vibe: counter goes up, device resumes, synchronous, no cap πŸ’–

✨ SYNOPSIS ✨

int pm_runtime_get_sync (struct device *dev );

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the target device, aka the main character you're bumping the counter for and resuming πŸŽ€

πŸ¦‹ DESCRIPTION πŸ¦‹

Bump up the runtime PM usage counter of dev and carry out runtime-resume of it synchronously. Like, actually wait for it β€” synchronous behavior is the assignment, bestie ⭐

The possible return values of this function are the same as for pm_runtime_resume πŸ‘‘ and the runtime PM usage counter of dev remains incremented in all cases, even if it returns an error code. Yes, even then 😭 the counter stays incremented, so be mindful of that.

Consider using pm_runtime_resume_and_get instead of it, especially if its return value is checked by the caller, as this is likely to result in cleaner code. The original page is literally recommending the cleaner-code route, and we love that for you 🫢

bestie PSA: if you're checking the return value, pm_runtime_resume_and_get is the one the page suggests considering β€” cleaner code, less chaos, iconic behavior ✨

🌸 SEE ALSO 🌸

Kernel file ./include/linux/pm_runtime.h β€” and here's the whole friend group roll call πŸ’…


later bestie πŸ˜­πŸ’œ this page's source/version is ./include/linux, dated October 2026, and it's the pm_runtime_get_sync(9) page β€” mwah πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from