STRUCT PWM_ARGS(9)
π 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 (anenum 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:
- Kernel file
./include/linux/pwm.h enum pwm_polarity(9)struct pwm_waveform(9)struct pwm_device(9)pwm_get_state(9)pwm_init_state(9)pwm_get_relative_duty_cycle(9)pwm_set_relative_duty_cycle(9)struct pwm_capture(9)struct pwm_ops(9)struct pwm_chip(9)pwmchip_supports_waveform(9)pwm_config(9)pwm_enable(9)pwm_disable(9)pwm_might_sleep(9)
πΈ 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
- 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