aboutsummaryrefslogtreecommitdiff
path: root/udev/99-pwm.rules
blob: 2b95f14991d468f78c84edc1b0f38656c0c4c379 (plain)
1
2
3
4
5
6
7
8
9
10
# Grants PWM access to the pwm group. Because UDEV is async, there might be a
# slight delay between changes to the directory tree (e.g., a new PWM channel
# being added) and changes to permissions taking effect. The command
# `udevadm settle` can be used to wait for the rule to finish execution.
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* ; \
'"