STRUCT CLK_DYN_RCG(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct clk_dyn_rcg(9) β€” the Kernel API Manual, bestie edition πŸŽ€

okay so picture this: it's a page from the Kernel API Manual and it's literally all about struct clk_dyn_rcg. say it with me β€” root clock generator with glitch free mux. yes queen, glitch free. no messy transitions, no drama, the mux just switches and everything stays flawless. πŸ’…βœ¨


✨ NAME ✨

struct clk_dyn_rcg β€” root clock generator with glitch free mux πŸ•°οΈπŸ¦‹

like, it's a root clock generator, and the mux? glitch free. that's the whole vibe. no cap.


🌸 SYNOPSIS 🌸

struct clk_dyn_rcg {
    u32 ns_reg[2];
    u32 md_reg[2];
    u32 bank_reg;
    u8 mux_sel_bit;
    struct mn       mn[2];
    struct pre_div  p[2];
    struct src_sel  s[2];
    const struct freq_tbl *freq_tbl;
    struct clk_regmap clkr;
 };

look at her. iconic struct. every field accounted for, nothing skipped, we respect the layout fr fr 🫢


πŸ’– Members πŸ’–

okay bestie, here's the member-by-member breakdown, and yes I'm gonna give each one its moment:

  • ns_reg β€” the NS0 and NS1 register πŸ‘‘ two of them, banked, living their best life.
  • md_reg β€” the MD0 and MD1 register ✨ same deal, a whole pair.
  • bank_reg β€” the register you XOR mux_sel_bit into to switch the glitch free mux πŸ”€ this is lowkey the main character of the switching situation.
  • mux_sel_bit β€” the bit you XOR in to switch the glitch free mux πŸ’… tiny but powerful, honestly.
  • mn β€” the mn counter, and it's banked πŸŽ€ [2] of them, one per bank, as one does.
  • s β€” the source selector, also banked 🌈 [2], matching energy.
  • freq_tbl β€” the frequency table πŸ“Š where the frequencies are, bestie.
  • clkr β€” the regmap clock handle πŸ”₯ the actual handle for the clock, slay.
ngl, p (the struct pre_div p[2]) is sitting right there in the struct too β€” the manual's member list doesn't say anything about it, so I'm not gonna invent lore. we simply acknowledge her presence 🫑

πŸ¦‹ SEE ALSO πŸ¦‹

go read these next, iykyk:

  • 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_rcg2(9)

aaaand that's the page!! πŸ’œ this cutie lives in ./drivers/clk/qcom and the date on it is October 2026 β€” so yeah, she's from the future, obviously, main character energy only. mwah, go forth and switch those muxes glitch-free, bestie πŸ’–πŸŽ€πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from