STRUCT PWRDM_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ NAME πŸ¦‹

okay bestie, welcome to the Kernel API Manual ✨ this page is literally all about struct pwrdm_ops β€” the β€œArch specific function implementations” situation πŸ’…. It’s giving architecture-specific function pointers, and we’re gonna go through every single one, no skipping 🫢.


✨ SYNOPSIS ✨

Here’s the whole struct, bestie β€” look at all these function pointers being iconic πŸ‘‘

struct pwrdm_ops {
    int (*pwrdm_set_next_pwrst)(struct powerdomain *pwrdm, u8 pwrst);
    int (*pwrdm_read_next_pwrst)(struct powerdomain *pwrdm);
    int (*pwrdm_read_pwrst)(struct powerdomain *pwrdm);
    int (*pwrdm_read_prev_pwrst)(struct powerdomain *pwrdm);
    int (*pwrdm_set_logic_retst)(struct powerdomain *pwrdm, u8 pwrst);
    int (*pwrdm_set_mem_onst)(struct powerdomain *pwrdm, u8 bank, u8 pwrst);
    int (*pwrdm_set_mem_retst)(struct powerdomain *pwrdm, u8 bank, u8 pwrst);
    int (*pwrdm_read_logic_pwrst)(struct powerdomain *pwrdm);
    int (*pwrdm_read_prev_logic_pwrst)(struct powerdomain *pwrdm);
    int (*pwrdm_read_logic_retst)(struct powerdomain *pwrdm);
    int (*pwrdm_read_mem_pwrst)(struct powerdomain *pwrdm, u8 bank);
    int (*pwrdm_read_prev_mem_pwrst)(struct powerdomain *pwrdm, u8 bank);
    int (*pwrdm_read_mem_retst)(struct powerdomain *pwrdm, u8 bank);
    int (*pwrdm_clear_all_prev_pwrst)(struct powerdomain *pwrdm);
    int (*pwrdm_enable_hdwr_sar)(struct powerdomain *pwrdm);
    int (*pwrdm_disable_hdwr_sar)(struct powerdomain *pwrdm);
    int (*pwrdm_set_lowpwrstchange)(struct powerdomain *pwrdm);
    int (*pwrdm_wait_transition)(struct powerdomain *pwrdm);
    int (*pwrdm_has_voltdm)(void);
    void (*pwrdm_save_context)(struct powerdomain *pwrdm);
    void (*pwrdm_restore_context)(struct powerdomain *pwrdm);
};

🌸 Members 🌸

Each of these is a function pointer member, and here’s what the page says about it πŸ’–:

  • pwrdm_set_next_pwrst β€” set the target power state for a pd 🎯
  • pwrdm_read_next_pwrst β€” read the target power state set for a pd πŸ‘€
  • pwrdm_read_pwrst β€” read the current power state of a pd ✨
  • pwrdm_read_prev_pwrst β€” read the prev power state entered by the pd πŸ•°οΈ
  • pwrdm_set_logic_retst β€” set the logic state in RET for a pd 🧠
  • pwrdm_set_mem_onst β€” set the Memory state in ON for a pd πŸ”›
  • pwrdm_set_mem_retst β€” set the Memory state in RET for a pd πŸ’Ύ
  • pwrdm_read_logic_pwrst β€” read the current logic state of a pd 🧚
  • pwrdm_read_prev_logic_pwrst β€” read the previous logic state entered by a pd πŸŒ€
  • pwrdm_read_logic_retst β€” read the logic state in RET for a pd πŸŒ™
  • pwrdm_read_mem_pwrst β€” read the current memory state of a pd πŸ“–
  • pwrdm_read_prev_mem_pwrst β€” read the previous memory state entered by a pd βͺ
  • pwrdm_read_mem_retst β€” read the memory state in RET for a pd πŸ’€
  • pwrdm_clear_all_prev_pwrst β€” clear all previous power states logged for a pd 🧹
  • pwrdm_enable_hdwr_sar β€” enable Hardware Save-Restore feature for the pd πŸ”₯
  • pwrdm_disable_hdwr_sar β€” disable Hardware Save-Restore feature for a pd πŸ’€
  • pwrdm_set_lowpwrstchange β€” enable pd transitions from a shallow to deep sleep πŸ›Œ
  • pwrdm_wait_transition β€” wait for a pd state transition to complete ⏳
  • pwrdm_has_voltdm β€” check if a voltdm association is needed πŸ”Œ

πŸ”₯ Description πŸ”₯

Okay so here’s the tea about pwrdm_set_lowpwrstchange β˜•: on the OMAP2 and 3-family chips, a powerdomain’s power state is not allowed to directly transition from one low-power state (e.g., CSWR) to another low-power state (e.g., OFF) without first waking up the powerdomain 😭. That literally wastes energy. So OMAP4 chips support the ability to transition a powerdomain power state directly from one low-power state to another ✨. The function pointed to by pwrdm_set_lowpwrstchange is intended to configure the OMAP4 hardware powerdomain state machine to enable this feature. Periodt πŸ’….


🌈 SEE ALSO 🌈

check out the kernel file ./arch/arm/mach-omap2/powerdomain.h and struct powerdomain(9) 🫢.


okay that’s the whole page, bestie πŸ’– this cutie comes from ./arch/arm/mach-omap2, and it’s the October 2026 edition of struct pwrdm_ops(9). go off, kernel queen πŸ‘‘βœ¨

πŸ“¦ where this page comes from