lkml.org 
[lkml]   [2020]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] pwm: sysfs: Set class on pwm devices
Hello,

I added Greg Kroah-Hartman who I discussed this with via irc a bit to
Cc:.

On Wed, Sep 30, 2020 at 11:20:56AM +0200, Lars Poeschel wrote:
> thank you for your review!
>
> On Wed, Sep 30, 2020 at 08:57:26AM +0200, Uwe Kleine-König wrote:
> > On Tue, Sep 29, 2020 at 02:19:53PM +0200, poeschel@lemonage.de wrote:
> > > From: Lars Poeschel <poeschel@lemonage.de>
> > >
> > > This adds a class to exported pwm devices.
> > > Exporting a pwm through sysfs did not yield udev events. The
> >
> > I wonder what is your use-case here. This for sure also has a place to
> > be mentioned in the commit log. I suspect there is a better way to
> > accomplish you way.
>
> Use-case is to be able to use a pwm from a non-root userspace process.
> I use udev rules to adjust permissions.

Hmm, how do you trigger the export? Without being aware of all the
details in the sysfs code I would expect that the exported stuff is
available instantly once the write used to export the PWM is completed.
So changing the permissions can be done directly after triggering the
export in the same process.

Out of interest: What do you use the pwm for? Isn't there a suitable
kernel driver that can do the required stuff? Compared to the kernel-API
the sysfs interface isn't atomic. Is this an annoyance?

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2020-09-30 11:42    [W:0.078 / U:0.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site