omap4_pwrdm...ev_mem_pwrst(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… omap4_pwrdm...ev_mem_pwrst(9) πŸ’…

okay so bestie, we're in the Kernel API Manual today, and this page is literally about omap4_pwrdm_read_prev_mem_pwrst β€” say that five times fast, i dare you 🫢


✨ NAME ✨

omap4_pwrdm_read_prev_mem_pwrst β€” reads the previous memory powerstate

like, it goes and finds out what the memory powerstate was before. nostalgia but for hardware πŸ’­


🌸 SYNOPSIS 🌸

int omap4_pwrdm_read_prev_mem_pwrst (struct powerdomain *pwrdm , u8 bank
);

so it returns an int, takes a struct powerdomain *pwrdm, and a u8 bank. that's the whole vibe check ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • pwrdm β€” a struct powerdomain * that you wanna read the mem powerstate for. it's giving "point me at the domain, bestie" πŸ‘‰
  • bank β€” the memory bank index. yes queen, you gotta say which bank 🏦

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea β˜• β€” this function reads the previous memory powerstate for a powerdomain. but it's not just a straight lookup, okay? it has layers. main character energy fr fr.

to figure out the previous memory powerstate, it first checks the previous powerstate for the domain. then:

  • if that previous state was OFF β€” oop, the logic has been lost 😭
  • if the previous state was RETENTION, then it reads the setting for the next memory retention state to see the actual value. detective work, we love to see it πŸ”
  • in every other case, the logic is retained. slay πŸ’…

and it returns either PWRDM_POWER_OFF or PWRDM_POWER_RET, depending on whether the logic was retained or not. two outcomes, no in-between, periodt ✨


πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file for this one is literally:

./arch/arm/mach-omap2/prm44xx.c

and here's the whole friend group, all together, no cap 🫢


ngl bestie, if you're reading this at 3am debugging power domains, drink some water and take a lil break πŸ’œ

and that's the page!! πŸŽ€ it lives over in ./arch/arm/mach-omap2, dated October 2026, and it's filed under omap4_pwrdm...ev_mem_pwrst(9) in the Kernel API Manual β€” mwah, go read your kernel source, ily, bye πŸ’–βœ¨

πŸ“¦ where this page comes from