STRUCT RZ_MTU3_PWM_CHIP(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 once
  • rate β€” MTU3 clock rate 🌈
  • user_count β€” MTU3 usage count πŸ‘‘ β€” an array, RZ_MTU3_MAX_HW_CHANNELS of them, one per channel
  • enable_count β€” MTU3 enable count πŸ”₯ β€” same deal, array sized RZ_MTU3_MAX_HW_CHANNELS
  • prescale β€” MTU3 prescale 🎚️ β€” array again, RZ_MTU3_MAX_HW_CHANNELS wide, of type u8
  • channel_data β€” MTU3 pwm channel data πŸ’œ β€” an array of struct rz_mtu3_pwm_channel, RZ_MTU3_MAX_HW_CHANNELS of 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.c struct rz_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, page struct 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