lkml.org 
[lkml]   [2016]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] pwm: Create device class for pwm channels
On Tue, Jun 14, 2016 at 07:12:04PM -0700, Greg KH wrote:
> From: David Hsu <davidhsu@google.com>
>
> Pwm channels don't send uevents when exported, this change adds the
> channels to a pwm class and set their device type to pwm_channel so
> uevents are sent.
>
> To do this properly, the device names need to change to uniquely
> identify a channel. This change is from pwmN to pwm-(chip->base):N
>
> Signed-off-by: David Hsu <davidhsu@google.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
> Documentation/pwm.txt | 6 ++++--
> drivers/pwm/sysfs.c | 15 ++++++++++++---
> 2 files changed, 16 insertions(+), 5 deletions(-)
>
> Note, this patch came from David with his work on a system that has
> dynamic PWM devices and channels, and we needed some way to tell
> userspace what is going on when they are added or removed. If anyone
> knows any other way of doing this that does not involve changing the pwm
> names, please let us know.

Is it truly PWM channels that dynamically appear and disappear? I'd be
interested in how that's achieved, because there are probably other
issues that will manifest if you do that. Do you have a pointer to the
work that David's been undertaking? Generally some more context on the
use-case would be helpful here.

Also I'd prefer if this avoided using chip->base here, because it exists
purely for legacy purposes and is supposed to go away eventually.

Thierry
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2016-06-15 17:21    [W:0.093 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site