pwm_apply_atomic(9)
π¦ pwm_apply_atomic(9) π¦
okay so this is from the Kernel API Manual, section 9, and itβs giving βtiny but powerful kernel helperβ energy. The function is pwm_apply_atomic, and yes bestie, the whole point is applying a new state to a PWM device from atomic context. β¨
β¨ NAME β¨
pwm_apply_atomic β apply a new state to a PWM device from atomic context.
important vibe check: not all PWM devices support this function β check with pwm_might_sleep(). π Donβt just assume, okay?
πΈ SYNOPSIS πΈ
int pwm_apply_atomic (struct pwm_device *pwm , const struct pwm_state
*state );
π ARGUMENTS π
pwmβ the PWM device. Thatβs the main character here. πstateβ the new state you want to apply. The glow-up in question. π
π RETURN π
It returns 0 on success, or a negative errno. Thatβs it β no mysterious extra values, no hidden drama. π
π₯ CONTEXT π₯
Any β the context is literally any. π«Ά
π SEE ALSO π
The kernel file is ./drivers/pwm/core.c, and the full bestie lineup is:
pwm_round_waveform_might_sleep(9)pwm_get_waveform_might_sleep(9)pwm_set_waveform_might_sleep(9)pwm_apply_might_sleep(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)
mwah π β this page is signed off from the source/version tag ./drivers/pwm, dated October 2026, and yes she ate. π«Άπ
π¦ 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