adafruit / Adafruit_Blinka

Add CircuitPython hardware API and libraries to MicroPython & CPython devices
https://learn.adafruit.com/circuitpython-on-raspberrypi-linux
MIT License
438 stars 328 forks source link

libgpio 2.x support for odroid c4 #784

Closed janvolck closed 4 months ago

janvolck commented 4 months ago

After an upgrade of my python environment I got issues with libgpiod

A quick search learned me that libgpiod has been updated again with breaking changes The same issue was already faced with RPI5 in issue https://github.com/adafruit/Adafruit_Blinka/issues/740

I much like the clean and neat approach taken with libgpiod_pin and made an attempt to mimic the same in libgpiod_chip for supporting multiple libgpiod versions on Odroid C4 (meson_g12_common).

Do note that in the past I created some regression causing issue https://github.com/adafruit/Adafruit_Blinka/issues/685 All this logic is now in libgpiod_chip.py, so I hope it didn't break anything. As @how2flow is also very active lately I hope he might also have a peak at it.

This approach could also be used Adafruit_Blinka/src/adafruit_blinka/microcontroller/amlogic/a311d/pin.py but as I can't test this I didn't touch it.

how2flow commented 4 months ago

@janvolck, Thank you for your hard work

C4 and N2 share the same module (meson_g12_common), so I should test it together! Thank you. Also, because it is a module under generic_linux, it will be solved in other models.