diff options
author | Paul Oliver <contact@pauloliver.dev> | 2025-02-07 17:10:05 +0000 |
---|---|---|
committer | Paul Oliver <contact@pauloliver.dev> | 2025-02-24 20:00:47 +0000 |
commit | c123795a0d9588f40f06dba918bb0130944302ec (patch) | |
tree | 61161cddf1ed08fcb18724bf2a642cfafe94c5a2 /sysconf/99-pwm.rules |
Initial
Diffstat (limited to 'sysconf/99-pwm.rules')
-rw-r--r-- | sysconf/99-pwm.rules | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sysconf/99-pwm.rules b/sysconf/99-pwm.rules new file mode 100644 index 0000000..8407ebe --- /dev/null +++ b/sysconf/99-pwm.rules @@ -0,0 +1,12 @@ +# This UDEV rule provides the `pwm` user group with access to PWM devices. +# Note that UDEV operates asynchronously, so there may be a slight delay +# between changes to the directory structure (e.g., when a new PWM channel is +# added) and the corresponding permission updates. To ensure the rule has been +# fully applied, you can use the command `udevadm settle` to wait for the UDEV +# process to complete. +SUBSYSTEM=="pwm*", PROGRAM="/bin/sh -c ' \ + chown -R root:pwm /sys/class/pwm ; \ + chmod -R 770 /sys/class/pwm ; \ + chown -R root:pwm /sys/devices/platform/axi/1000120000.pcie/*.pwm/pwm/pwmchip* ; \ + chmod -R 770 /sys/devices/platform/axi/1000120000.pcie/*.pwm/pwm/pwmchip* ; \ +'" |