linuxgpio/libgpiod: using GPIOs on different chips #2015
-
Hello, I'm trying to use a Coral board to program an Atmega 128a chip using the linuxgpio programmer. The Coral board exposes a few GPIO lines from different chips, as shown here: https://coral.ai/docs/dev-board/gpio/#header-pinout. Since four GPIO lines are needed, I must use pins wired on different chips but it seems that − when arvdude is built with libgpiod support − it is assumed that all lines belong to a same chip, as can be inferred from the If libgpiod support is disabled, avrdude falls back to gool old sysfs GPIO interface which seems to work fine with this setup. Am I overlooking something? Is it a known limitation of using libgpiod? Thanks in advance for any insight! 🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Just wondering if you have some comments about this enhancement request. |
Beta Was this translation helpful? Give feedback.
-
Issue #2027 created based on this discussion. |
Beta Was this translation helpful? Give feedback.
Good catch, and correct analysis. This is a limitation of the current libgpiod implementatation - not the library itself, but the avrdude programmers part. The reason is that the implementation tried to be backwards compatible to the sysfs configuration part. The sysfs configuration uses good old integer numbers for each gpio and each chip starts at a defined, mostly static offset.
For this request here, we would need to modify/extend the configuration file format. For example we could add a prefix, e.g.
reset = 0.22
where0
is then the number of the chip and22
is the gpio line within this chip. When the prefix is missing, we could discuss, whether it should be assumed that chip is 0, or…