]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - Documentation/pwm.txt
pwm: Add sysfs interface
authorH Hartley Sweeten <hartleys@visionengravers.com>
Tue, 11 Jun 2013 17:38:59 +0000 (10:38 -0700)
committerThierry Reding <thierry.reding@gmail.com>
Fri, 21 Jun 2013 09:32:51 +0000 (11:32 +0200)
commit76abbdde2d95a3807d0dc6bf9f84d03d0dbd4f3d
tree63a5476d6fbf80ec90b813461ec7ec67ff462684
parent3dd0a909479c1d372341d749b4ff94cd638b57da
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 <hsweeten@visionengravers.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Lars Poeschel <poeschel@lemonage.de>
Cc: Ryan Mallon <rmallon@gmail.com>
Cc: Rob Landley <rob@landley.net>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Documentation/ABI/testing/sysfs-class-pwm [new file with mode: 0644]
Documentation/pwm.txt
drivers/pwm/Kconfig
drivers/pwm/Makefile
drivers/pwm/core.c
drivers/pwm/sysfs.c [new file with mode: 0644]
include/linux/pwm.h