pm_genpd_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– pm_genpd_init β€” the Kernel API Manual glow-up ✨

okay so real talk, this one lives in the Kernel API Manual (section 9, the big-kid kernel section, iykyk) and it's literally the "make a generic I/O PM domain object exist" moment. main character energy for a struct πŸŽ€


✨ NAME ✨

pm_genpd_init β€” Initialize a generic I/O PM domain object. That's it, that's the whole vibe: you're bringing a genpd into the world 🍼


πŸ¦‹ SYNOPSIS πŸ¦‹

int pm_genpd_init (struct generic_pm_domain *genpd , struct
       dev_power_governor *gov , bool is_off );

three args, one int back, no cap. nothing else to it bestie πŸ’…


🌸 ARGUMENTS 🌸

  • genpd β€” the PM domain object you're initializing. this is the one, the main character, the struct getting its whole setup 🫢
  • gov β€” the PM domain governor you're associating with the domain. and yes, it may be NULL β€” so if you don't have one, it's not a crisis, just pass NULL and keep it moving πŸ™ˆ
  • is_off β€” the initial value of the domain's power_is_off field. yes literally that, it's just seeding the starting state, lowkey important ⭐

πŸ’œ DESCRIPTION πŸ’œ

Returns 0 on successful initialization β€” slay, we love a zero πŸŽ‰ β€” else a negative error code. so like, check your return value, bestie, negative means it did not eat πŸ’€


πŸ”₯ SEE ALSO πŸ”₯

the whole friend group, fr fr β€” and also the kernel file it lives in: ./drivers/pmdomain/core.c πŸ‘‘


bestie note: that SEE ALSO list is long long, so don't panic β€” it's just the whole genpd extended universe showing up to support you πŸ«ΆπŸ’–

πŸ’… and that's the page!! source is ./drivers/pmdomain, version/date is October 2026, and it's all from the Kernel API Manual (pm_genpd_init(9)) β€” go initialize something iconic πŸ˜­πŸŽ€βœ¨

πŸ“¦ where this page comes from