STRUCT CLK_RCG2(9)
π struct clk_rcg2(9)
okay so this is the root clock generator page from the Kernel API Manual β yes, the whole manual, we're fancy. buckle up bestie, we're reading a struct and it's actually kind of iconic.
β¨ SYNOPSIS β¨
struct clk_rcg2 {
u32 cmd_rcgr;
u8 mnd_width;
u8 hid_width;
u8 safe_src_index;
const struct parent_map *parent_map;
union {
const struct freq_tbl *freq_tbl;
const struct freq_multi_tbl *freq_multi_tbl;
};
struct clk_regmap clkr;
u8 cfg_off;
u32 parked_cfg;
bool hw_clk_ctrl;
};
like, look at her. ten-ish fields of pure clock-generator main character energy πΈ
π Members π
okay let's go field by field, no skipping, i promise π«Ά
cmd_rcgrβ this one corresponds to*_CMD_RCGR. that's it, that's the vibe.mnd_widthβ the number of bits inm/n/dvalues. m, n, and d. yes those ones πhid_widthβ number of bits in the half integer divider. half. integer. divider. slay.safe_src_indexβ the safe src index value, literally what it says, she's the safe option π₯parent_mapβ maps software's parent index over to hardware'ssrc_selfield. translation: her software self vs her hardware self, iykyk β¨{unnamed_union}β anonymous. that's the whole description. an anonymous union, living her mysterious life πfreq_tblβ frequency table πfreq_multi_tblβ frequency table for clocks reachable with multiple RCGs conf. (yes, that's the exact wording, i'm not touching it, it's perfect as is)clkrβ regmap clock handle πcfg_offβ defines the cfg register offset from theCMD_RCGR+CFG_REGparked_cfgβ cached value of the CFG register for parked RCGs. she's parked but she remembers everything πhw_clk_ctrlβ whether to enable hardware clock control. bool bestie, it's a yes or no question π
π¦ SEE ALSO π¦
go read these next, fr fr, they're all in the same friend group:
- Kernel file
./drivers/clk/qcom/clk-rcg.h struct mn(9)struct pre_div(9)struct src_sel(9)struct clk_rcg(9)struct clk_dyn_rcg(9)
and that's the whole page!! this little struct lives over in ./drivers/clk/qcom, and this edition of the Kernel API Manual is dated October 2026 β so like, future-coded of her. periodt. πβπ§
π¦ 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