STRUCT INGENIC_CGU(9)
π struct ingenic_cgu(9) β the Kernel API Manual, but make it make sense
okay so bestie, you know that <linux/clk-provider.h>-adjacent corner of the kernel where the Ingenic clock stuff lives? Yeah. This is the struct at the very heart of it β it's the little bundle of data the driver keeps around to describe, wellβ¦ the whole CGU. Clock Generation Unit. Main character energy fr fr π
β¨ NAME β¨
struct ingenic_cgu β literally just "data about the CGU", no cap. That's the whole vibe check. π
πΈ SYNOPSIS πΈ
struct ingenic_cgu {
struct device_node *np;
void __iomem *base;
const struct ingenic_cgu_clk_info *clock_info;
struct clk_onecell_data clocks;
spinlock_t lock;
};
that's the whole thing. five members. she's compact, she's iconic, she's doing the most with the least π
π¦ Members π¦
okay let's go through everybody in the group chat, one by one π
npβ the device tree node that caused the CGU to be probed. so like, this is the origin story node. it's the reason we're all here π«Άbaseβ theioremap'ed base address of the CGU registers. this is the actual memory-mapped doorway into the hardware, so big deal, handle with care β¨clock_infoβ an array containing information about implemented clocks. it's the roster, the cast list, the who's-who of every clock this thing actually supports πclocksβ used to provide clocks to DT, allows lookup ofstruct clk*. so this is how the device tree gets handed its clocks and how you go find thestruct clk*later. iykyk π₯lockβ lock to be held whilst manipulating CGU registers. no skipping this one!! if you're touching the registers, you're holding the lock. periodt. π
genuinely, bestie: lock is not decorative. it says "to be held whilst manipulating CGU registers" and it means it π
π SEE ALSO π
Kernel file ./drivers/clk/ingenic/cgu.h β plus the whole friend group:
struct ingenic_cgu_pll_info(9)struct ingenic_cgu_mux_info(9)struct ingenic_cgu_div_info(9)struct ingenic_cgu_fixdiv_info(9)struct ingenic_cgu_gate_info(9)struct ingenic_cgu_custom_info(9)struct ingenic_cgu_clk_info(9)struct ingenic_clk(9)ingenic_cgu_new(9)ingenic_cgu_register_clocks(9)
like, the entire ensemble. go read them, they all ate π
and that's the page, bestie π§ this was ./drivers/clk/ingenic, from October 2026, and yes the header/footer said struct ingenic_cgu(9) in the Kernel API Manual β slay, bye! ππ
π¦ 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