pwrdm_set_mem_onst(9)
π pwrdm_set_mem_onst π
okay bestie, welcome to the Kernel API Manual β¨ this one's called pwrdm_set_mem_onst(9) and it's literally the glow-up planner for your memory power states π«Ά
πΈ NAME πΈ
pwrdm_set_mem_onst β set memory power state while powerdomain ON π
β¨ SYNOPSIS β¨
int pwrdm_set_mem_onst (struct powerdomain *pwrdm , u8 bank , u8 pwrst
);
π ARGUMENTS π
pwrdmβ thestruct powerdomain *you wanna set, bestie. that's the whole vibe target π―bankβ the memory bank number to set, and it's0-3(yes, only four of them, iconic range tbh) π’pwrstβ one of thePWRDM_POWER_*macros. pick your state, queen π
π¦ DESCRIPTION π¦
so what this actually does: it sets the next power state pwrst that memory bank bank of the powerdomain pwrdm will enter when the powerdomain enters the ON state. the way that works is, bank is a number from 0 to 3, and it represents different types of memory depending on the powerdomain β so like, same number, different meaning, iykyk π§
ngl the returns here matter, so pay attention: it returns-EINVALif the powerdomain pointer is null or the target power state isn't supported for this memory bank. it returns-EEXISTif the target memory bank doesn't exist or isn't controllable (rude, but okay). and it returns0upon success β slay π
π SEE ALSO π
the 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_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)omap_set_pwrdm_state(9)pwrdm_save_context(9)pwrdm_restore_context(9)
that's the whole page, no cap π
and like any good group chat, it's got a sign-off: this one lives down in ./arch/arm/mach-omap2, dated October 2026, manual name pwrdm_set_mem_onst(9) β periodt ππ
π¦ 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