Closed sriram-rs closed 3 months ago
Sounds like it needs to be updated to use libgpiod. If I recall correctly, I'm the one who added this board and at the time libgpiod wasn't available, but if they are updating the kernel, perhaps it is now.
Thanks very much @makermelissa for the revert. Looking forward to the inclusion. So that I can use Adafruit_Blinka alone for all peripheral access with busio and IO access with digitalio.
Got my RockPi S out and have now re-familiarized myself with it. Which image are you running? The official Rock Pi S Buster image is still on kernel 4.4.
Ok, the official buster image is kinda terrible. It's kernel 4.4 and although libgpiod is available, there are no /dev/gpiochipX devices, so it's pointless. I'm going to update for Armbian.
Thanks @makermelissa again for seamlessly pointing out to the issue 👍🏽 .
I am running 6.1.68 rc image provided by radxa.
Ok, the official buster image is kinda terrible. It's kernel 4.4 and although libgpiod is available, there are no /dev/gpiochipX devices, so it's pointless. I'm going to update for Armbian.
That's the core of the issue.
I have got Adafruit_blinka to work with 4.4.143. It is fully functional.
Seems /sys/class/gpio approach had been deprecated since kernel 4.8 and changed to /dev/gpiochipX
Thanks a lot, @makermelissa and @tekktrik for the support.
I will give the library a try and let know in case of queries. !!
Board Name
RockPiS
Steps
Adafruit blinka OSError
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "", line 1, in
File "/usr/local/lib/python3.11/dist-packages/digitalio.py", line 187, in init
self.direction = Direction.INPUT
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/digitalio.py", line 217, in direction
self._pin.init(mode=Pin.IN)
File "/usr/local/lib/python3.11/dist-packages/adafruit_blinka/microcontroller/generic_linux/sysfs_pin.py", line 94, in init
self._open(self.IN)
File "/usr/local/lib/python3.11/dist-packages/adafruit_blinka/microcontroller/generic_linux/sysfs_pin.py", line 142, in _open
raise GPIOError(e.errno, "Exporting GPIO: " + e.strerror) from IOError
adafruit_blinka.microcontroller.generic_linux.sysfs_pin.GPIOError: [Errno 2] Exporting GPIO: No such file or directory
Description
Error while using digitialio to configure GPIO with linux 6.1
Since the /sys/class/gpio is deprecated since kernel 4.8, Adafruit_Blinka cannot be used to configure and control gpios on the upstream kernel.
Now there is access only to /dev/gpiochip{x} instead of /sys/class/gpio/{x}.
Any help would be greatly appreciated.
Additional information
No response