pwrdm_get_valid_lp_state(9)
π pwrdm_get_valid_lp_state(9) π
π NAME π
pwrdm_get_valid_lp_state β Find best match deep power state. Okay so this page is from the Kernel API Manual, and it's literally the βfind best match deep power stateβ moment. π«Ά
β¨ SYNOPSIS β¨
The signature is giving exactly this:
u8 pwrdm_get_valid_lp_state (struct powerdomain *pwrdm , bool is_logic_state , u8 req_state );
π ARGUMENTS π
pwrdmβ the power domain for which we want to find the best match. πis_logic_stateβ Are we looking for logic state match here? Should be one ofPWRDM_xxxmacro values. π§req_stateβ the requested power state. π
πΈ RETURN πΈ
It hands back the closest match for requested power state. The default fallback is RET for logic state and ON for power state. That's the safety net, bestie. π«Ά
π¦ DESCRIPTION π¦
Okay so this function does a search from the power domain data, looking for the closest valid power domain state that the hardware can actually achieve. The PRCM definitions for PWRSTCTRL allow us to program whatever configuration we'd like, and PRCM will actually attempt such a transition β but if the powerdomain does not actually support it, we end up with a hung system. π The valid power domain states are already available in our powerdomain data files, so this function tries to do the following:
a) find if we have an exact match to the request β no issues. Slay.
b) else find if a deeper power state is possible. π
c) failing which, it tries to find the closest higher power state for the request. periodt. π
π SEE ALSO π
Kernel file ./arch/arm/mach-omap2/powerdomain.c, and the whole squad is:
_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)omap_set_pwrdm_state(9)pwrdm_save_context(9)pwrdm_restore_context(9)
And that's the vibe check, bestie: source/version is ./arch/arm/mach-omap2, dated October 2026, and this page is pwrdm_get_valid_lp_state(9) from the Kernel API Manual. Catch you in the group chat! π
β¨
π¦ 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