Commit Graph
1 Commits
Author SHA1 Message Date
H Hartley Sweeten 76abbdde2d pwm: Add sysfs interface
Add a simple sysfs interface to the generic PWM framework.

  /sys/class/pwm/
  `-- pwmchipN/           for each PWM chip
      |-- export          (w/o) ask the kernel to export a PWM channel
      |-- npwm            (r/o) number of PWM channels in this PWM chip
      |-- pwmX/           for each exported PWM channel
      |   |-- duty_cycle  (r/w) duty cycle (in nanoseconds)
      |   |-- enable      (r/w) enable/disable PWM
      |   |-- period      (r/w) period (in nanoseconds)
      |   `-- polarity    (r/w) polarity of PWM (normal/inversed)
      `-- unexport        (w/o) return a PWM channel to the kernel

Based on work by Lars Poeschel.

Signed-off-by: H Hartley Sweeten <[email protected]>
Cc: Thierry Reding <[email protected]>
Cc: Lars Poeschel <[email protected]>
Cc: Ryan Mallon <[email protected]>
Cc: Rob Landley <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
2013-06-21 11:32:51 +02:00