pwm_get_wave..._might_sleep(9)
πΈ pwm_get_waveform_might_sleep β Kernel API Manual π¦
okay bestie, so this is a page from the Kernel API Manual, and the star of the show is pwm_get_waveform_might_sleep. The header up there is pwm_get_wave..._might_sleep(9) β yes it's truncated, no it's not a typo, that's just how the manual renders it, iykyk. π
β¨ NAME β¨
pwm_get_waveform_might_sleep β the way you query the hardware about its current configuration. Girlypop, this one cannot be used in atomic context. Like, at all. π«Ά
π SYNOPSIS π
int pwm_get_waveform_might_sleep (struct pwm_device *pwm , struct pwm_waveform *wf );
π ARGUMENTS π
pwmβ PWM device πwfβ output parameter
π DESCRIPTION π
So basically this stores the current configuration of the PWM in wf. β¨ And lowkey the important part: this is the equivalent of pwm_get_state_hw (and not pwm_get_state) for pwm_waveform. No cap, that distinction is doing main character energy here β don't mix them up. π
β RETURN β
0 on success, or a negative errno. Periodt. π
π§ CONTEXT π§
May sleep. π΄ (Which, yeah, is exactly why the whole "cannot be used in atomic context" thing up in NAME is a big deal.)
ngl this is the vibe check that matters most β if you're in atomic context, you do not pass go, you do not call this function. π
π SEE ALSO π
Kernel file ./drivers/pwm/core.c
pwm_round_waveform_might_sleep(9)pwm_set_waveform_might_sleep(9)pwm_apply_might_sleep(9)pwm_apply_atomic(9)pwm_get_state_hw(9)pwm_adjust_config(9)pwm_capture(9)pwm_request_from_chip(9)of_pwm_get(9)acpi_pwm_get(9)pwm_get(9)pwm_put(9)devm_pwm_get(9)devm_fwnode_pwm_get(9)__pwmchip_add(9)pwmchip_remove(9)pwm_add_table(9)pwm_remove_table(9)
that's the whole page bestie, you ate it up π
sign-off time π β this lil beauty lives under ./drivers/pwm, it's tagged October 2026, and the footer names it pwm_get_wave..._might_sleep(9). slay, go read the source, ily πβ¨
π¦ 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