pwm_get_wave..._might_sleep(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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


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