lkml.org 
[lkml]   [2013]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5] pwm: add sysfs interface
On Tue, Jun 11, 2013 at 10:38:59AM -0700, H Hartley Sweeten wrote:
> 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
>
> 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>
> ---
> v5: * rename the 'duty' attribute to 'duty_cycle'
> * make the Kconfig option hidden and enabled when CONFIG_SYSFS
> is enabled
> * use sysfs_streq() in pwm_polarity_store()
> v4: * address a number of issues pointed out by Thierry Reding
> - fix some typos and wording issues in the Documentation
> - rename the new source file to sysfs.c
> - rename some of the variables in sysfs.c to clarify them
> - fix the period store so it does not change the duty cycle
> - change the polarity attribute to use a string representation
> - add a warning message is the pwmchip_sysfs_export() fails
> v3: * fix an issue with the export/unexport of the PWM chip
> v2: * add API documentation and update Documentation/pwm.txt
> * fix some issues pointed out by Ryan Mallon
> * add the pwm attributes to dev.groups so they are created
> when the device is registered for the exported PWM
> v1: * Based on previous work by Lars Poecshel

Applied, thanks.

Thierry
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2013-06-21 11:41    [W:0.040 / U:11.592 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site