STRUCT OMAP1_CLK(9)
π struct omap1_clk β the OMAP1 struct clk moment
okay so this is straight out of the Kernel API Manual, and it's literally the whole personality of the OMAP1 clock struct, laid out for you. no cap, it's giving "let me introduce you to every field bestie" energy π
β¨ NAME β¨
struct omap1_clk β OMAP1 struct clk. that's it, that's the name, slay π
πΈ SYNOPSIS πΈ
here's the whole struct, bestie, exactly as it lives:
struct omap1_clk {
struct clk_hw hw;
const struct clkops *ops;
unsigned long rate;
void __iomem *enable_reg;
unsigned long (*recalc)(struct omap1_clk *clk, unsigned long rate);
int (*set_rate)(struct omap1_clk *clk, unsigned long rate, unsigned long p_rate);
long (*round_rate)(struct omap1_clk *clk, unsigned long rate, unsigned long *p_rate);
int (*init)(struct omap1_clk *clk);
u8 enable_bit;
u8 fixed_div;
u8 flags;
u8 rate_offset;
};
look at all those little fields, they're like a whole friend group honestly π«Ά
π Members π
like, member by member, so you know exactly who's who:
hwβ thestruct clk_hwfor common clock framework integration. this is the one that lets your clock hang out with the cool common-clock-framework crowd β¨opsβ thestruct clkops *for this clock. its whole designated-ops situation πrateβ the current clock rate. right now, in real time, that's the number πenable_regβ the register you write to in order to enable the clock (peepenable_bit, they're a package deal π)recalcβ fn ptr that returns the clock's current rate. it's the "what's your rate rn" friend π₯set_rateβ fn ptr that can change the clock's current rate. the makeover friend π«round_rateβ fn ptr that can round the clock's current rate. the "close enough bestie" friend πinitβ fn ptr to do clock-specific initialization. the setup era, the glow-up prequel π±enable_bitβ the bitshift to write to enable/disable the clock (seeenable_reg). yes, these two are inseparable, iykyk πfixed_divβ when> 0, this clock's rate is its parent's rate /fixed_div. literally parent's rate divided byfixed_div, math ate πflagsβ see "struct clk.flags possibilities" above. go look up there bestie, the flag lore lives up there β¬οΈrate_offsetβ the bitshift for the rate selection bitfield (OMAP1 only, so if you're not on OMAP1, this one's not for you π)
π¦ SEE ALSO π¦
- Kernel file
./arch/arm/mach-omap1/clock.h struct clkops(9)
go read those, they're the supporting cast and honestly they serve π
that's the whole vibe check, bestie π this page is from ./arch/arm/mach-omap1, dated October 2026, and it's filed under struct omap1_clk(9) β iconic, we stan, 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