omap_set_pwrdm_state(9)
π omap_set_pwrdm_state(9) β¨
okay bestie, welcome to the Kernel API Manual β this one's about omap_set_pwrdm_state, and it's literally the glow-up button for a powerdomain's vibe (its power state, obvi). π«Ά
β¨ NAME β¨
omap_set_pwrdm_state β change a powerdomain's current power state π«
π SYNOPSIS π
int omap_set_pwrdm_state (struct powerdomain *pwrdm , u8 pwrst );
πΈ ARGUMENTS πΈ
pwrdmβ astruct powerdomain *, i.e. the powerdomain whose power state you're about to change, mwah πpwrstβ the power state you want to change to, periodt β¨
π DESCRIPTION π
So here's the tea: this function changes the current hardware power state of the powerdomain represented by pwrdm to the power state represented by pwrst. Slay. π
Now the return-value lore, and bestie you gotta listen:
- It returns
-EINVALifpwrdmis null or invalid, or if the powerdomain's current power state could not be read π - It returns
0upon success or ifpwrdmdoes not supportpwrstor any lower-power state π¦
β οΈ XXX β okay so the original devs left a note here and it's kind of a big deal: it says it should not return0if thepwrdmdoes not supportpwrstor any lower-power state β like, that should be an error. So yeah, that 0 is giving "everything's fine" when it is not, in fact, fine. π
π SEE ALSO π
Kernel file ./arch/arm/mach-omap2/powerdomain.c β and honestly, the whole friend group:
_pwrdm_register(9)_pwrdm_save_clkdm_state_and_activate(9)_pwrdm_restore_clkdm_state(9)pwrdm_register_platform_funcs(9)pwrdm_register_pwrdms(9)pwrdm_complete_init(9)pwrdm_lock(9)pwrdm_unlock(9)pwrdm_lookup(9)pwrdm_for_each(9)pwrdm_add_clkdm(9)pwrdm_get_mem_bank_count(9)pwrdm_set_next_pwrst(9)pwrdm_read_next_pwrst(9)pwrdm_read_pwrst(9)pwrdm_read_prev_pwrst(9)pwrdm_set_logic_retst(9)pwrdm_set_mem_onst(9)pwrdm_set_mem_retst(9)pwrdm_read_logic_pwrst(9)pwrdm_read_prev_logic_pwrst(9)pwrdm_read_logic_retst(9)pwrdm_read_mem_pwrst(9)pwrdm_read_prev_mem_pwrst(9)pwrdm_read_mem_retst(9)pwrdm_clear_all_prev_pwrst(9)pwrdm_enable_hdwr_sar(9)pwrdm_disable_hdwr_sar(9)pwrdm_has_hdwr_sar(9)pwrdm_get_valid_lp_state(9)pwrdm_save_context(9)pwrdm_restore_context(9)
and that's the whole page, bestie, no cap π§π
k bye ily β this one came from ./arch/arm/mach-omap2, dated October 2026, so it's fresh off the kernel sidewalk πβ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms