STRUCT ROHM_DVS_CONFIG(9)
πΈ 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_maskandsnvs_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
- 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