STRUCT PWM_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

Kernel API Manual, page struct pwm_ops(9) β€” welcome to the group chat, bestie! 🫢

struct pwm_ops β€” PWM controller operations. That's the whole NAME vibe, and honestly? Iconic. πŸ‘‘

πŸ¦‹ SYNOPSIS πŸ¦‹

Okay so here's the struct, and I need you to keep every single signature exactly as written β€” no renaming, no merging, no β€œcreative” edits, fr fr:

struct pwm_ops {
    int (*request)(struct pwm_chip *chip, struct pwm_device *pwm);
    void (*free)(struct pwm_chip *chip, struct pwm_device *pwm);
    int (*capture)(struct pwm_chip *chip, struct pwm_device *pwm, struct pwm_capture *result, unsigned long timeout);
    size_t sizeof_wfhw;
    int (*round_waveform_tohw)(struct pwm_chip *chip, struct pwm_device *pwm, const struct pwm_waveform *wf, void *wfhw);
    int (*round_waveform_fromhw)(struct pwm_chip *chip, struct pwm_device *pwm, const void *wfhw, struct pwm_waveform *wf);
    int (*read_waveform)(struct pwm_chip *chip, struct pwm_device *pwm, void *wfhw);
    int (*write_waveform)(struct pwm_chip *chip, struct pwm_device *pwm, const void *wfhw);
    int (*apply)(struct pwm_chip *chip, struct pwm_device *pwm, const struct pwm_state *state);
    int (*get_state)(struct pwm_chip *chip, struct pwm_device *pwm, struct pwm_state *state);
};

πŸŽ€ Members πŸŽ€

  • request β€” optional hook for requesting a PWM. ✨
  • free β€” optional hook for freeing a PWM. πŸ¦‹
  • capture β€” capture and report PWM signal. πŸ’…
  • sizeof_wfhw β€” size (in bytes) of driver specific waveform presentation. πŸŽ€
  • round_waveform_tohw β€” convert a struct pwm_waveform to driver specific presentation. 🌸
  • round_waveform_fromhw β€” convert a driver specific waveform presentation to struct pwm_waveform. πŸ’–
  • read_waveform β€” read driver specific waveform presentation from hardware. πŸ”₯
  • write_waveform β€” write driver specific waveform presentation to hardware. ⭐
  • apply β€” atomically apply a new PWM config. πŸ‘‘
  • get_state β€” get the current PWM state. 🌈

🌟 SEE ALSO 🌟

Kernel file: ./include/linux/pwm.h


🫢 and that's the whole page, bestie β€” go forth and keep those ops exactly as listed. Source/version: ./include/linux Β· date: October 2026 Β· manual page: struct pwm_ops(9) 🌸
πŸ“¦ where this page comes from