On Fri, Apr 21, 2017 at 7:18 PM, William Hermans <[email protected]> wrote:
> Another thing that come to mind right off is that some files can only be
> read, while others still can only be written to. If you're attempting to
> change permissions to these files in a way that it's not meant to be used.
> It could potentially cause the whole rule to fail.

Yeah, this one is really stumping me:

With only the first part:

SUBSYSTEM=="pwm", ACTION=="add", PROGRAM="/bin/sh -c '/bin/chown -R
root:pwm /sys/class/pwm/"
SUBSYSTEM=="pwm", ACTION=="add", PROGRAM="/bin/sh -c    '/bin/chmod -R
ug+rw /sys/class/pwm/"

/sys/class/pwm/ looks like:

lrwxrwxrwx  1 root pwm  0 Apr 22 01:22 pwmchip0 ->
../../devices/platform/ocp/48300000.epwmss/48300100.ecap/pwm/pwmchip0
lrwxrwxrwx  1 root pwm  0 Apr 22 01:22 pwmchip1 ->
../../devices/platform/ocp/48304000.epwmss/48304100.ecap/pwm/pwmchip1
lrwxrwxrwx  1 root pwm  0 Apr 22 01:22 pwmchip2 ->
../../devices/platform/ocp/48300000.epwmss/48300200.pwm/pwm/pwmchip2
lrwxrwxrwx  1 root pwm  0 Apr 22 01:22 pwmchip4 ->
../../devices/platform/ocp/48302000.epwmss/48302200.pwm/pwm/pwmchip4
lrwxrwxrwx  1 root pwm  0 Apr 22 01:22 pwmchip6 ->
../../devices/platform/ocp/48304000.epwmss/48304200.pwm/pwm/pwmchip6

All the pwmchipX dir's look like:

lrwxrwxrwx 1 root root    0 Apr 22 01:24 device -> ../../../48300100.ecap
--w------- 1 root root 4.0K Apr 22 01:24 export
-r--r--r-- 1 root root 4.0K Apr 22 01:24 npwm
drwxr-xr-x 2 root root    0 Apr 22 01:24 power
lrwxrwxrwx 1 root root    0 Apr 22 01:24 subsystem ->
../../../../../../../class/pwm
-rw-r--r-- 1 root root 4.0K Apr 22 01:22 uevent
--w------- 1 root root 4.0K Apr 22 01:24 unexport

with teh 2nd rule

debian@test-bbb-2:/sys/class/pwm/pwmchip0$ ls -lha
total 0
drwxrwxr-x 3 root pwm     0 Apr 22 01:32 .
drwxr-xr-x 3 root root    0 Apr 22 01:32 ..
lrwxrwxrwx 1 root pwm     0 Apr 22 01:32 device -> ../../../48300200.pwm
-rw-rw---- 1 root pwm  4.0K Apr 22 01:32 export
-rw-rw-r-- 1 root pwm  4.0K Apr 22 01:32 npwm
drwxrwxr-x 2 root pwm     0 Apr 22 01:32 power
lrwxrwxrwx 1 root pwm     0 Apr 22 01:32 subsystem ->
../../../../../../../class/pwm
-rw-rw-r-- 1 root pwm  4.0K Apr 22 01:32 uevent
-rw-rw---- 1 root pwm  4.0K Apr 22 01:32 unexport

Regards,


-- 
Robert Nelson
https://rcn-ee.com/

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAOCHtYgHHmkTah-F5e%2BH6yAPMSY5xpfmMCpO6qx8pDzgX%3DaKnQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to