Re: [RESEND PATCH] Revert "pwm: Set class for exported channels in sysfs"
From: Gottfried Haider
Date: Fri Sep 28 2018 - 20:19:35 EST
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>
Best,
Gottfried