Re: [RESEND PATCH] Revert "pwm: Set class for exported channels in sysfs"

From: Fabrice Gasnier
Date: Mon Oct 01 2018 - 09:29:04 EST


On 09/29/2018 02:19 AM, Gottfried Haider wrote:
> Hello Thierry & Fabrice,
>
>>> Still, it is possible to send uevent (KOBJ_CHANGE) on pwmchipN device,
>>> to notify of a change, e.g. pwmX channel being exported/unexported.
>
> I tested this patch, and I am happy to report that it works with the
> udev rule that Raspbian (Raspberry Pi's Debian derivative) has in
> place:
>
> SUBSYSTEM=="pwm*", PROGRAM="/bin/sh -c '\
> chown -R root:gpio /sys/class/pwm && chmod -R 770 /sys/class/pwm;\
> chown -R root:gpio
> /sys/devices/platform/soc/*.pwm/pwm/pwmchip* && chmod -R 770
> /sys/devices/platform/soc/*.pwm/pwm/pwmchip*\
> '"
>
>
> So while I can't comment on the uevent semantics, it would solve what
> the original patch attempted to enable (non-root use of pwm).
>
> Tested-by: Gottfried Haider <gottfried.haider@xxxxxxxxx>

Hi Gottfried, Thierry,

Thanks for testing. I just sent a new series with:
- revert patch
- additional patch with proposed uevent notification (change) on pwmchip.

Best Regards,
Fabrice

>
> Best,
> Gottfried
>