Skip to content

Conversation

mlodedrwale
Copy link

Use python3-libgpiod to scan /dev/gpiochip* and match each chip’s label, replacing the sysfs-only lookup. This ensures reliable detection on H616 and adds support for Orange Pi SBCs where the old method failed.

Use python3-libgpiod to scan /dev/gpiochip* and match
each chip’s label, replacing the sysfs-only lookup.
This ensures reliable detection on H616 and adds support
for Orange Pi SBCs where the old method failed.
Copy link
Collaborator

@makermelissa makermelissa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is depending upon a specific version of GPIOD. Some versions have chip and some have Chip. It would be better to make use of https://github.com/adafruit/Adafruit_Blinka/blob/main/src/adafruit_blinka/microcontroller/generic_linux/libgpiod_chip.py which will figure out the appropriate class by looking at specific traits and returning the correct one as Chip so it's consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants