Additional problem on Raspberry Pi (model 3): there is no:
/sys/class/gpio
This does exist with the 4.8.15-300 kernel, but it has problems:
[root@RPi3-1 gpiochip970]# echo 993 >/sys/class/gpio/export [root@RPi3-1 gpiochip970]# echo 1 > /sys/class/gpio/gpio993/value bash: echo: write error: Operation not permitted [root@RPi3-1 gpiochip970]# ls -l /sys/class/gpio/gpio993 lrwxrwxrwx. 1 root root 0 Jan 15 10:24 /sys/class/gpio/gpio993 -> ../../devices/platform/soc/3f200000.gpio/gpiochip0/gpio/gpio993 [root@RPi3-1 gpiochip970]# ls -l /sys/devices/platform/soc/3f200000.gpio/gpiochip0/gpio/gpio993 total 0 -rw-r--r--. 1 root root 4096 Jan 15 10:24 active_low lrwxrwxrwx. 1 root root 0 Jan 15 10:24 device -> ../../../gpiochip0 -rw-r--r--. 1 root root 4096 Jan 15 10:24 direction -rw-r--r--. 1 root root 4096 Jan 15 10:24 edge drwxr-xr-x. 2 root root 0 Jan 15 10:24 power lrwxrwxrwx. 1 root root 0 Jan 15 10:24 subsystem -> ../../../../../../../class/gpio -rw-r--r--. 1 root root 4096 Jan 15 10:24 uevent -rw-rw-rw-. 1 root root 4096 Jan 15 10:27 value [root@RPi3-1 gpiochip970]# echo 1 > /sys/devices/platform/soc/3f200000.gpio/gpiochip0/gpio/gpio993/value bash: echo: write error: Operation not permitted [root@RPi3-1 gpiochip970]#
On Sun, Jan 15, 2017 at 4:09 PM, Richard Ryniker ryniker@alum.mit.edu wrote:
Additional problem on Raspberry Pi (model 3): there is no:
/sys/class/gpio
The sysfs interface is deprecated [1] so I had disabled it on rawhide. I didn't intend on this change coming back into the stable releases but I must have screwed something up. It'll be back in F-25 with the 4.9.4 kernel which should be built today.
This does exist with the 4.8.15-300 kernel, but it has problems:
[root@RPi3-1 gpiochip970]# echo 993 >/sys/class/gpio/export [root@RPi3-1 gpiochip970]# echo 1 > /sys/class/gpio/gpio993/value bash: echo: write error: Operation not permitted [root@RPi3-1 gpiochip970]# ls -l /sys/class/gpio/gpio993 lrwxrwxrwx. 1 root root 0 Jan 15 10:24 /sys/class/gpio/gpio993 -> ../../devices/platform/soc/3f200000.gpio/gpiochip0/gpio/gpio993 [root@RPi3-1 gpiochip970]# ls -l /sys/devices/platform/soc/3f200000.gpio/gpiochip0/gpio/gpio993 total 0 -rw-r--r--. 1 root root 4096 Jan 15 10:24 active_low lrwxrwxrwx. 1 root root 0 Jan 15 10:24 device -> ../../../gpiochip0 -rw-r--r--. 1 root root 4096 Jan 15 10:24 direction -rw-r--r--. 1 root root 4096 Jan 15 10:24 edge drwxr-xr-x. 2 root root 0 Jan 15 10:24 power lrwxrwxrwx. 1 root root 0 Jan 15 10:24 subsystem -> ../../../../../../../class/gpio -rw-r--r--. 1 root root 4096 Jan 15 10:24 uevent -rw-rw-rw-. 1 root root 4096 Jan 15 10:27 value [root@RPi3-1 gpiochip970]# echo 1 > /sys/devices/platform/soc/3f200000.gpio/gpiochip0/gpio/gpio993/value bash: echo: write error: Operation not permitted [root@RPi3-1 gpiochip970]#
[1] http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=a0...
I am very pleased to report that 4.9.4 has working sysfs gpio support. Thank you, Peter Robinson.
On Thu, Jan 19, 2017 at 3:02 PM, ryniker@alum.mit.edu wrote:
I am very pleased to report that 4.9.4 has working sysfs gpio support. Thank you, Peter Robinson.
It was actually working prior, just not via the sysfs interface.
For reference if you install the kernel-tools package for that kernel (and newer) there's a few new gpio utils like lsgpio, gpio-event-mon and gpio-hammer
Peter
PS next time can you use a useful title like "issues with gpio on kernel 4.x.y" as it's easier to know the topic :)