STRUCT ROHM_DVS_CONFIG(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

struct rohm_dvs_config β€” the register descriptions that do dynamic voltage scaling, bestie πŸ’…

This is a page from the Kernel API Manual, and yes we're reading kernel struct docs for fun now, that's the vibe πŸ¦‹


✨ SYNOPSIS ✨

struct rohm_dvs_config {
    uint64_t level_map;
    unsigned int run_reg;
    unsigned int run_mask;
    unsigned int run_on_mask;
    unsigned int idle_reg;
    unsigned int idle_mask;
    unsigned int idle_on_mask;
    unsigned int suspend_reg;
    unsigned int suspend_mask;
    unsigned int suspend_on_mask;
    unsigned int lpsr_reg;
    unsigned int lpsr_mask;
    unsigned int lpsr_on_mask;
    unsigned int snvs_reg;
    unsigned int snvs_mask;
    unsigned int snvs_on_mask;
 };

Like, look at her. Sixteen fields. A whole little wardrobe of registers and masks πŸŽ€


πŸ’– Members πŸ’–

Okay so every system state gets its own lil trio β€” a register address, a value mask, and an enable mask. Iconic, consistent, we love a pattern ✨

  • level_map β€” a bitmap that represents which run-levels this regulator actually supports πŸ‘‘ it's giving "here's my range, don't ask for more."
  • run_reg β€” the register address for the regulator config when we're in the 'run' state πŸ”₯
  • run_mask β€” the value mask for the regulator voltages in the 'run' state πŸ’œ
  • run_on_mask β€” the enable mask for the regulator in the 'run' state βœ…
  • idle_reg β€” register address for the regulator config in the 'idle' state 😴
  • idle_mask β€” value mask for the regulator voltages in the 'idle' state πŸ’œ
  • idle_on_mask β€” enable mask for the regulator in the 'idle' state βœ…
  • suspend_reg β€” register address for the regulator config in the 'suspend' state πŸŒ™
  • suspend_mask β€” value mask for the regulator voltages in the 'suspend' state πŸ’œ
  • suspend_on_mask β€” enable mask for the regulator in the 'suspend' state βœ…
  • lpsr_reg β€” register address for the regulator config in the 'lpsr' state 🧚
  • lpsr_mask β€” value mask for the regulator voltages in the 'lpsr' state πŸ’œ
  • lpsr_on_mask β€” enable mask for the regulator in the 'lpsr' state βœ…
Also chilling up in the struct: snvs_reg, snvs_mask and snvs_on_mask 🫢 those three show up in the definition above and that's all this page has to say about them, no cap.

πŸ¦‹ Description πŸ¦‹

So this whole struct is the description of the ROHM PMICs' voltage configuration registers across the different system states β€” run, idle, suspend, lpsr, the works 🌈

It's literally used to configure the PMIC correctly at startup, based on the values read from DT (device tree, iykyk) πŸ”₯ Like, it's the translator between "what the device tree says" and "what the chip's registers need to hear." Main character energy fr fr.


⭐ SEE ALSO ⭐

  • Kernel file ./include/linux/mfd/rohm-generic.h β€” go read the source bestie, it's right there πŸ’–

Okay that's the whole page, you ate that πŸ“ This little gem lives in ./include/linux/mfd and it's dated October 2026 β€” mwah, goodbye, slay πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from