pm_stay_awake(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ pm_stay_awake β€” a little kernel API manual moment, bestie

okay so this is a page from the Kernel API Manual (section 9, the pm_stay_awake(9) one) and it's honestly kind of a small page but it's important, so let's get into it πŸ’…


πŸ’– NAME

pm_stay_awake β€” notify the PM core that a wakeup event is being processed.

like, that's it, that's the whole job. but it's a big job, ok 😌


✨ SYNOPSIS

void pm_stay_awake (struct device *dev );

πŸŽ€ ARGUMENTS

  • dev β€” the device that the wakeup event is related to. this is your main character device. the one the whole event is about 🫢

🌸 DESCRIPTION

so here's the vibe: you call this to notify the PM core of a wakeup event (signaled by dev) β€” and it does that by calling __pm_stay_awake for dev's wakeup source object. that's the whole mechanism, no extra steps, no cap ✨

call this function after detecting a wakeup event, if pm_relax is going to be called directly after processing the event (and possibly passing it to user space for further processing). that's the specific situation this is for β€” pm_stay_awake now, pm_relax right after you're done. it's giving matched set, it's giving bookends πŸ”₯

ngl the ordering matters here β€” detect the event first, then call this, and pm_relax follows once the event is processed. don't skip steps, bestie πŸ’€

🌈 SEE ALSO

ok this list is long but it ate, every single one of these is a friend of this page:


and that's the page!! 🧚 sign-off time: this one lives under ./drivers/base/power, dated October 2026, and it's filed as pm_stay_awake(9) in the Kernel API Manual. go keep those wakeup sources awake, bestie, you got this πŸ‘‘β­

πŸ“¦ where this page comes from