STRUCT RZ_MTU3_CNT(9)
π struct rz_mtu3_cnt(9)
okay so bestie, welcome to the Kernel API Manual β today's main character is struct rz_mtu3_cnt, aka the MTU3 counter private data. she's holding all the counter's little secrets and we're about to go through every single one, no skipping, periodt β¨
π NAME π
struct rz_mtu3_cnt β MTU3 counter private data. that's it, that's the vibe. it's the struct that keeps the counter's private stuff, wellβ¦ private π
πΈ SYNOPSIS πΈ
here's the whole glow-up, exactly as it lives in the kernel, no edits, no cap:
struct rz_mtu3_cnt {
struct clk *clk;
struct mutex lock;
struct rz_mtu3_channel *ch;
bool count_is_enabled[RZ_MTU3_MAX_LOGICAL_CNTR_CHANNELS];
union {
u16 mtu_16bit_max[RZ_MTU3_MAX_HW_CNTR_CHANNELS];
u32 mtu_32bit_max;
};
};
look at her. absolutely iconic. now let's meet the members one by one π«Ά
π Members π
clkβ the MTU3 module clock. she keeps time, literally πlockβ a lock that stops concurrent access from messing with the ceiling and the count at the same time. it's giving bodyguard energy fr fr π₯chβ the HW channels for the counters. the whole squad of hardware channels, right here π¦count_is_enabledβ the enabled state of the Counter value channel. basically a little "are we on?" checklist per channel β{unnamed_union}β anonymous. yes, she has no name. mysterious, lowkey main character energy πmtu_16bit_maxβ cache for 16-bit counters πmtu_32bit_maxβ cache for 32-bit counters π§
quick reminder bestie:mtu_16bit_maxandmtu_32bit_maxare chilling inside that anonymous union, so they're sharing the same space β that's just how the struct is written, iykyk π
β SEE ALSO β
- Kernel file
./drivers/counter/rz-mtu3-cnt.cβ go read the source, she's right there π
and that's the whole page, bestie!! this lil beauty comes to you from ./drivers/counter, dated October 2026, and she answers to the name struct rz_mtu3_cnt(9). mwah πβ¨π
π¦ 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