pwm_apply_atomic(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ 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:


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