Thanks for the answer. A couple of us have tried this independently and we haven’t been able to get it working. As you can see from the session information below not all files are created in the ‘gpio’ group.
I’m not sure just following what they do on the Raspberry Pi is the solution from the look of the comment in item number 2 where it says “It’s also root only (doesn’t know about /dev/gpiomem)” they may have done a little bit more.
Any other ideas or suggestions?
Thanks.
cd /sys/class/gpio/
linaro@linaro-alip:/sys/class/gpio$ ls -lL
total 0
-rwxrwx--- 1 root gpio 4096 Apr 12 22:45 export
drwxr-xr-x 3 root root 0 Jan 1 1970 gpiochip0
drwxr-xr-x 3 root root 0 Jan 1 1970 gpiochip440
drwxr-xr-x 3 root root 0 Jan 1 1970 gpiochip444
drwxr-xr-x 3 root root 0 Jan 1 1970 gpiochip448
drwxr-xr-x 3 root root 0 Jan 1 1970 gpiochip480
-rwxrwx--- 1 root gpio 4096 Apr 12 22:45 unexport
linaro@linaro-alip:/sys/class/gpio$ echo 115 > export
linaro@linaro-alip:/sys/class/gpio$ ls -lL
total 0
-rwxrwx--- 1 root gpio 4096 Apr 12 22:47 export
drwxr-xr-x 3 root root 0 Apr 12 22:47 gpio115
drwxr-xr-x 3 root root 0 Apr 12 22:47 gpiochip0
drwxr-xr-x 3 root root 0 Apr 12 22:47 gpiochip440
drwxr-xr-x 3 root root 0 Apr 12 22:47 gpiochip444
drwxr-xr-x 3 root root 0 Apr 12 22:47 gpiochip448
drwxr-xr-x 3 root root 0 Apr 12 22:47 gpiochip480
-rwxrwx--- 1 root gpio 4096 Apr 12 22:45 unexport
linaro@linaro-alip:/sys/class/gpio$ ls -lL gpio115
total 0
-rw-r--r-- 1 root root 4096 Apr 12 22:49 active_low
drwxr-xr-x 4 root root 0 Jan 1 1970 device
-rw-r--r-- 1 root root 4096 Apr 12 22:49 direction
-rw-r--r-- 1 root root 4096 Apr 12 22:49 edge
drwxr-xr-x 2 root root 0 Apr 12 22:49 power
drwxrwx--- 2 root gpio 0 Apr 12 22:47 subsystem
-rw-r--r-- 1 root root 4096 Apr 12 22:47 uevent
-rw-r--r-- 1 root root 4096 Apr 12 22:49 value
linaro@linaro-alip:~$ groups
linaro adm dialout cdrom sudo audio dip video plugdev staff systemd-journal netdev bluetooth pulse-access gpio
linaro@linaro-alip:~$ more /etc/udev/rules.d/99-com.rules
SUBSYSTEM=="gpio*", PROGRAM="/bin/sh -c 'chown -R root:gpio /sys/class/gpio && chmod -R 770 /sys/class/gpio; chown -R root:gpio /sys/devices/virtual/
gpio && chmod -R 770 /sys/devices/virtual/gpio; chown -R root:gpio /sys/devices/platform/soc/*.gpio/gpio && chmod -R 770 /sys/devices/platform/soc/*.
gpio/gpio'"