STRUCT PWMCHIP_WAVEFORM(9)
π struct pwmchip_waveform(9) β like, the whole vibe β¨
okay so bestie, welcome to the Kernel API Manual entry for struct pwmchip_waveform, and no cap, this one is literally the blueprint for describing a PWM waveform on a pwm_chip's PWM channel. every field is about to eat, so let's go π
β¨ NAME β¨
struct pwmchip_waveform β describes a PWM waveform for a pwm_chip's PWM channel π
πΈ SYNOPSIS πΈ
struct pwmchip_waveform {
__u32 hwpwm;
__u32 __pad;
__u64 period_length_ns;
__u64 duty_length_ns;
__u64 duty_offset_ns;
};
like, that's the whole struct. she's cute, she's tidy, she's iconic π¦
π MEMBERS π
girlies, meet the fields β every single one matters, so pay attention π
hwpwmβ the per-chip relative index of the PWM device. think of it as her little ID number inside the chip π__padβ padding, and it must be zero. no negotiations, no exceptions, fr fr πperiod_length_nsβ the duration of the repeating period. and listen: a value of0represents a disabled PWM, so don't be out here acting surprised πduty_length_nsβ the duration of the active part in each period. that's the "on" chunk of the wave, the main character energy of the whole thing β‘duty_offset_nsβ the offset of the rising edge from a period's start. where the wave gets up and starts living π
π SEE ALSO π
kernel file ./include/uapi/linux/pwm.h β go read it, iykyk π
lowkey reminder bestie:__padstays zero andperiod_length_ns = 0means the PWM is off. that's the whole mood, don't forget it π
and that's the page!! sourced from ./include/uapi/linux, dated October 2026, and yes the header up top said struct pwmchip_waveform(9) like the queen she is π«Ά slay, bye π
β¨
π¦ 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