diff --git a/userspace/root/etc/udev/rules.d/99-gpio.rules b/userspace/root/etc/udev/rules.d/99-gpio.rules deleted file mode 100644 index ed25b52..0000000 --- a/userspace/root/etc/udev/rules.d/99-gpio.rules +++ /dev/null @@ -1,2 +0,0 @@ -SUBSYSTEM=="gpio*", PROGRAM="/bin/sh -c 'find -L /sys/class/gpio/ -maxdepth 2 -exec chown root:gpio {} \; -exec chmod 770 {} \; || true'" -SUBSYSTEM=="gpio", KERNEL=="gpiochip[0]", GROUP="gpio", MODE="660" diff --git a/userspace/root/etc/udev/rules.d/mountpartitions.rules b/userspace/root/etc/udev/rules.d/mountpartitions.rules index 9c34804..5db3469 100644 --- a/userspace/root/etc/udev/rules.d/mountpartitions.rules +++ b/userspace/root/etc/udev/rules.d/mountpartitions.rules @@ -1,3 +1,2 @@ # Create Android-style boot partition links for vendor services. -KERNEL=="mmcblk[0-9]*p[0-9]*", SUBSYSTEM=="block", ACTION=="add", RUN+="/etc/udev/scripts/bootdevice-by-name.sh %k" KERNEL=="[hs]d[a-z][0-9]*", SUBSYSTEM=="block", ACTION=="add", RUN+="/etc/udev/scripts/bootdevice-by-name.sh %k" diff --git a/userspace/root/usr/comma/gpio.sh b/userspace/root/usr/comma/gpio.sh index d87c01c..fd2a1b9 100755 --- a/userspace/root/usr/comma/gpio.sh +++ b/userspace/root/usr/comma/gpio.sh @@ -25,19 +25,20 @@ pins=( for p in ${pins[@]}; do echo $p - # this is SSD_3v3 EN on tici - if [ "$p" -eq 41 ] && grep -q "comma tici" /sys/firmware/devicetree/base/model; then - echo "Skipping $p" - continue - fi - echo $p > /sys/class/gpio/export - until [ -d /sys/class/gpio/gpio$p ] - do + until [ -d /sys/class/gpio/gpio$p ]; do sleep .05 done done +# still needed on devices after comma three? HUB_RST_N=30 gpio $HUB_RST_N 1 + +# add gpio sysfs nodes to gpio group +find -L /sys/class/gpio/ -maxdepth 2 -exec chown root:gpio {} \; -exec chmod 770 {} \; + +# setup gpiochip for the gpio group +chgrp gpio /dev/gpiochip0 +chmod 660 /dev/gpiochip0