aboutsummaryrefslogtreecommitdiff
path: root/drivers/pwm/sysfs.c
AgeCommit message (Collapse)AuthorFilesLines
2013-07-29pwm: convert class code to use dev_groupsGreg Kroah-Hartman1-9/+12
The dev_attrs field of struct class is going away soon, dev_groups should be used instead. This converts the PWM class code to use the correct field. Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2013-06-21pwm: Add sysfs interfaceH Hartley Sweeten1-0/+352
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]>