2019-11-03 13:42:06 +01:00
|
|
|
SUBSYSTEM=="input", GROUP="input", MODE="0660"
|
|
|
|
SUBSYSTEM=="i2c-dev", GROUP="i2c", MODE="0660"
|
|
|
|
SUBSYSTEM=="spidev", GROUP="spi", MODE="0660"
|
|
|
|
SUBSYSTEM=="bcm2835-gpiomem", GROUP="gpio", MODE="0660"
|
2022-05-13 10:38:25 +02:00
|
|
|
SUBSYSTEM=="bcm2835-gpiomem", GROUP="gpio", MODE="0660"
|
2019-11-03 13:42:06 +01:00
|
|
|
SUBSYSTEM=="rpivid-*", GROUP="video", MODE="0660"
|
|
|
|
|
2022-05-13 10:38:25 +02:00
|
|
|
KERNEL=="vcsm-cma", GROUP="video", MODE="0660"
|
|
|
|
SUBSYSTEM=="dma_heap", GROUP="video", MODE="0660"
|
|
|
|
SUBSYSTEM=="vchiq", GROUP="video", MODE="0660"
|
|
|
|
|
2019-11-03 13:42:06 +01:00
|
|
|
SUBSYSTEM=="gpio", GROUP="gpio", MODE="0660"
|
2022-05-13 10:38:25 +02:00
|
|
|
SUBSYSTEM=="gpio", KERNEL=="gpiochip*", ACTION=="add", PROGRAM="/bin/sh -c 'chgrp -R gpio /sys/class/gpio && chmod -R g=u /sys/class/gpio'"
|
|
|
|
SUBSYSTEM=="gpio", ACTION=="add", PROGRAM="/bin/sh -c 'chgrp -R gpio /sys%p && chmod -R g=u /sys%p'"
|
|
|
|
|
|
|
|
# PWM export results in a "change" action on the pwmchip device (not "add" of a new device), so match actions other than "remove".
|
|
|
|
SUBSYSTEM=="pwm", ACTION!="remove", PROGRAM="/bin/sh -c 'chgrp -R gpio /sys%p && chmod -R g=u /sys%p'"
|
2021-10-06 09:36:06 +02:00
|
|
|
|
2022-05-13 10:38:25 +02:00
|
|
|
KERNEL=="ttyAMA0", PROGRAM="/bin/sh -c '\
|
2021-10-06 09:36:06 +02:00
|
|
|
ALIASES=/proc/device-tree/aliases; \
|
2022-05-13 10:38:25 +02:00
|
|
|
if cmp -s $$ALIASES/uart0 $$ALIASES/serial0; then \
|
2021-10-06 09:36:06 +02:00
|
|
|
echo 0;\
|
2022-05-13 10:38:25 +02:00
|
|
|
elif cmp -s $$ALIASES/uart0 $$ALIASES/serial1; then \
|
|
|
|
echo 1; \
|
|
|
|
else \
|
|
|
|
exit 1; \
|
|
|
|
fi\
|
|
|
|
'", SYMLINK+="serial%c"
|
|
|
|
|
|
|
|
KERNEL=="ttyAMA1", PROGRAM="/bin/sh -c '\
|
|
|
|
ALIASES=/proc/device-tree/aliases; \
|
|
|
|
if [ -e /dev/ttyAMA0 ]; then \
|
|
|
|
exit 1; \
|
|
|
|
elif cmp -s $$ALIASES/uart0 $$ALIASES/serial0; then \
|
|
|
|
echo 0;\
|
|
|
|
elif cmp -s $$ALIASES/uart0 $$ALIASES/serial1; then \
|
2021-10-06 09:36:06 +02:00
|
|
|
echo 1; \
|
|
|
|
else \
|
|
|
|
exit 1; \
|
|
|
|
fi\
|
|
|
|
'", SYMLINK+="serial%c"
|
|
|
|
|
|
|
|
KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\
|
|
|
|
ALIASES=/proc/device-tree/aliases; \
|
2022-05-13 10:38:25 +02:00
|
|
|
if cmp -s $$ALIASES/uart1 $$ALIASES/serial0; then \
|
2021-10-06 09:36:06 +02:00
|
|
|
echo 0; \
|
2022-05-13 10:38:25 +02:00
|
|
|
elif cmp -s $$ALIASES/uart1 $$ALIASES/serial1; then \
|
2021-10-06 09:36:06 +02:00
|
|
|
echo 1; \
|
|
|
|
else \
|
|
|
|
exit 1; \
|
|
|
|
fi \
|
|
|
|
'", SYMLINK+="serial%c"
|
2022-05-13 10:38:25 +02:00
|
|
|
|
|
|
|
ACTION=="add", SUBSYSTEM=="vtconsole", KERNEL=="vtcon1", RUN+="/bin/sh -c '\
|
|
|
|
if echo RPi-Sense FB | cmp -s /sys/class/graphics/fb0/name; then \
|
|
|
|
echo 0 > /sys$devpath/bind; \
|
|
|
|
fi; \
|
|
|
|
'"
|