aboutsummaryrefslogtreecommitdiff
path: root/udev/99-pwm.rules
blob: 8407ebec4bc07561c11eaa66023a997b71cdf1ea (plain)
1
2
3
4
5
6
7
8
9
10
11
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* ; \
'"