dev_pm_genpd_is_on(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– dev_pm_genpd_is_on β€” bestie's guide to checking if a genpd is literally on πŸ’–

okay so first things first, this is a page from the Kernel API Manual (yes, the actual kernel docs, we're being fancy today πŸ‘‘) and it's all about one little function that tells you whether a device's generic power domain is awake or not. that's it. that's the whole vibe. ✨


✨ NAME ✨

dev_pm_genpd_is_on β€” gets the current power domain status of a device 🫢

like, "hey is this thing's power domain on rn or nah" β€” that's the entire job, no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

bool dev_pm_genpd_is_on (struct device *dev );

it returns a bool (so: yes or no, true or false, on or off, slay or not-slay πŸ’…) and it takes exactly one argument. keep reading, we'll get to it.


🌸 ARGUMENTS 🌸

  • dev β€” the device whose current power status you wanna know about πŸŽ€ like, hand it the device and it'll tell you what's up

πŸ’œ DESCRIPTION πŸ’œ

okay so here's what's actually happening under the hood: this function checks whether the generic power domain associated with the given device is on or not. and the way it does that? it verifies if genpd_status_on equals GENPD_STATE_ON. that's the check. that's the whole thing. simple, iconic, does what it says on the tin ✨

ngl it's giving "one job and it does it well" energy and honestly? obsessed.


⚠️ NOTE ⚠️

okay bestie, this part is important, do NOT skip it πŸ™ˆ

this function returns the power status of the genpd at the time of the call. but the power status may change after β€” because of activity from other devices sharing the same genpd. multiple devices, one genpd, chaos, you get it πŸ’€

so like... this information should not be relied upon for long-term decisions about the device power state. it's a snapshot, not a promise. a vibe check, not a commitment. do not build your whole power-management strategy on it, fr fr 🫢


πŸŽ€ RETURN πŸŽ€

so the original page... kind of leaves this one blank 😭 no documented return value to relay here, so we're not gonna make one up. the synopsis does say it's a bool β€” that's all the source gives us, and we're being honest about it. πŸ’€


πŸ”₯ SEE ALSO πŸ”₯

buckle up bestie, this list is LONG, but every single one of these is a real reference and we are NOT skipping a single one πŸ‘‘

the kernel file it lives in:

  • ./drivers/pmdomain/core.c 🧚

and now, the full squad:

like I said. the whole squad. read them all, iykyk πŸ’…


and that's the page!! πŸ’–βœ¨πŸŽ€

cute little sign-off before you go: this one comes from <pink>./drivers/pmdomain</pink>, and it's dated <purple>October 2026</purple> β€” the manual title at the bottom is just dev_pm_genpd_is_on(9) all over again, which, yeah, very on brand. go check if your genpd is on, bestie, but remember: it might change the second you look away πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from