piface / pifacecommon

Common functions for interacting with PiFace products
GNU General Public License v3.0
42 stars 30 forks source link

Fix bring_gpio_interrupt_into_userspace on Debian, #29 #30

Open sibradzic opened 5 years ago

sibradzic commented 5 years ago

This introduces GPIO offset detection by checking the dir name starting with gpiochip[0-9]* found in /sys/bus/gpio/devices/gpiochip0/../gpio/.

The change is tested and confirmed working on Debian Buster 10 and Raspbian 9.9, on both Raspberry Pi 3B and 3B+

illuusio commented 5 years ago

Fixes working also with openSUSE Leap 15.1 without it doesn't work.

sibradzic commented 5 years ago

@illuusio a bit off-topic, but what is the state of device-tree spi support on OpenSUSE Leap? I am asking because it gets quite painful in Debian Buster, relying on hacking and re-compiling in-kernel RPi3+ device-tree...

illuusio commented 5 years ago

@illuusio a bit off-topic, but what is the state of device-tree spi support on OpenSUSE Leap? I am asking because it gets quite painful in Debian Buster, relying on hacking and re-compiling in-kernel RPi3+ device-tree...

If you mean can I enable SPI with 'dtparam=spi' in 'config.txt'? Yes it's working as expected.

illuusio commented 5 years ago

If you mean that new kernel tainting spidev not supported then is in all that bad shape as it is in Debian.

sibradzic commented 5 years ago

Well, in Debian 10 (Buster) kernel 4.19 spidev is ignoring SPI device cause it ain't in device tree. I had to hack & re-compile device tree to enable the thing. The dtparam=spi in config does nothing.