pwrdm_get_valid_lp_state(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 of PWRDM_xxx macro 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:


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