STRUCT PWM_ARGS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct pwm_args (9) β€” board-dependent PWM arguments πŸ’–

okay so bestie, welcome to the Kernel API Manual, section 9, where we talk about struct pwm_args. this is the board-dependent PWM arguments situation and it's honestly iconic. let's get into it πŸ’…


✨ SYNOPSIS ✨

struct pwm_args {
    u64 period;
    enum pwm_polarity polarity;
 };

like, that's the whole struct. two members. she's simple, she's elegant, she's giving minimal queen energy πŸ‘‘


🌸 Members 🌸

  • period β€” the reference period, periodt. literally what it says on the tin πŸŽ€
  • polarity β€” the reference polarity (an enum pwm_polarity, no cap) 🌈

πŸ¦‹ DESCRIPTION πŸ¦‹

so this structure describes board-dependent arguments attached to a PWM device ✨ these args are usually retrieved from the PWM lookup table or the device tree β€” iykyk, that's where they live 🏑

πŸ’€ big warning bestie: do NOT confuse this with the PWM state. like, fr fr, they are not the same thing.

the tea is this: PWM arguments represent the initial configuration that users want to use on this PWM device 🫢 β€” not the current PWM hardware state. one is the vibe you're going for, the other is what the hardware is actually doing right now. two completely different main characters 😭


πŸ”₯ SEE ALSO πŸ”₯

okay the friend group is large and honestly they all ate:


🌸 and that's the whole page, bestie! this lil slice of the Kernel API Manual lives over in ./include/linux, dated October 2026 β€” mwah, sending you a struct pwm_args(9) sized kiss πŸ’‹πŸ«Άβœ¨

πŸ“¦ where this page comes from