STRUCT RZ_MTU3_PWM_CHIP(9)
π struct rz_mtu3_pwm_chip(9) β bestie, meet your new fave struct β¨
okay so this is from the Kernel API Manual, and it is literally the main character of pwm-rz-mtu3.c. Say hi to struct rz_mtu3_pwm_chip π β it's the private data situation for the MTU3 pwm, and honestly? She's holding a lot together.
πΈ NAME πΈ
struct rz_mtu3_pwm_chip β MTU3 pwm private data π
like yes, that's the whole name section, and yes, she ate.
β¨ SYNOPSIS β¨
here's the whole squad, laid out exactly:
struct rz_mtu3_pwm_chip {
struct clk *clk;
struct mutex lock;
unsigned long rate;
u32 user_count[RZ_MTU3_MAX_HW_CHANNELS];
u32 enable_count[RZ_MTU3_MAX_HW_CHANNELS];
u8 prescale[RZ_MTU3_MAX_HW_CHANNELS];
struct rz_mtu3_pwm_channel channel_data[RZ_MTU3_MAX_HW_CHANNELS];
};
note the lil' space before that final }; β we keep it exactly as the manpage gives it, no cap π«Ά
π¦ Members π¦
so here's the member-by-member vibe check, and ngl every single one is doing her job:
clkβ MTU3 module clock β° (the clock, the moment, the timing of it all)lockβ the lock that prevents concurrent access for the usage count π β like a bouncer at the club, no two people touching that count at oncerateβ MTU3 clock rate πuser_countβ MTU3 usage count π β an array,RZ_MTU3_MAX_HW_CHANNELSof them, one per channelenable_countβ MTU3 enable count π₯ β same deal, array sizedRZ_MTU3_MAX_HW_CHANNELSprescaleβ MTU3 prescale ποΈ β array again,RZ_MTU3_MAX_HW_CHANNELSwide, of typeu8channel_dataβ MTU3 pwm channel data π β an array ofstruct rz_mtu3_pwm_channel,RZ_MTU3_MAX_HW_CHANNELSof them
the way that every count-y field is an array indexed by channel... that's the structure's whole personality iykyk
π SEE ALSO π
go read these bestie, they're the rest of the lore:
- Kernel file
./drivers/pwm/pwm-rz-mtu3.cstructrz_mtu3_channel_io_map(9),struct rz_mtu3_pwm_channel(9)
like, the source file itself is right there at ./drivers/pwm/pwm-rz-mtu3.c β go touch the grass, it's literally in the tree π±
fr fr: this page lives under./drivers/pwm, and it's dated October 2026, in the Kernel API Manual, pagestruct rz_mtu3_pwm_chip(9). so when anyone asks, that's the citation, periodt π
okay bye bestie, go read rz_mtu3_pwm_channel(9) next β 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