Allow non-root access to spidev nodes
- Add spidev support to our udev rules which already handle PWM/GPIO.
Change-Id: I5621af1b633672355ec9adfd0a7144595d914fe1
diff --git a/debian/changelog b/debian/changelog
index 6495469..7cafa9f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+mendel-minimal (8-4) mendel-eagle; urgency=medium
+
+ * Allow non-root access to spidev nodes
+
+ -- Coral <coral-support@google.com> Thu, 03 Dec 2020 16:24:11 -0800
+
mendel-minimal (8-3) mendel-day; urgency=medium
* Allow non-root access to GPIO and PWM sysfs nodes
diff --git a/debian/mendel-minimal.udev b/debian/mendel-minimal.udev
index 56b41ee..7ec7f88 100644
--- a/debian/mendel-minimal.udev
+++ b/debian/mendel-minimal.udev
@@ -11,3 +11,8 @@
chown -R root:input /sys/class/pwm && chmod -R 770 /sys/class/pwm;\
chown -R root:input /sys$devpath && chmod -R 770 /sys$devpath\
'"
+SUBSYSTEM=="spidev", GROUP="input", MODE="0660"
+SUBSYSTEM=="spidev*", PROGRAM="/bin/sh -c '\
+ chown -R root:input /sys/class/spidev && chmod -R 770 /sys/class/spidev;\
+ chown -R root:input /sys$devpath && chmod -R 770 /sys$devpath\
+'"