Hi all,
We recently added GPMC support to our board and now gpiod added an extra gpiochip.
However, my C application is broken because I had everything starting at gpiochip0, but the gpmc gpio is now chip 0.
What is the logic behind the enumeration in gpiod? Do I need to rearrange things in the DTS file so that GPMC is enabled last?
I would like the actual gpios to be labeled as gpiochip0-3, and the GPMC gpios to be gpiochip4.
I tried searching around for this but couldn't find anything.
Or, is there a way for me in C to reference the name, like gpio-0-31 rather than the enumerated field?
Before enabling GPMC:
root@am335x:~# gpiodetect
gpiochip0 [gpio-0-31] (32 lines)
gpiochip1 [gpio-32-63] (32 lines)
gpiochip2 [gpio-64-95] (32 lines)
gpiochip3 [gpio-96-127] (32 lines)
After enabling GPMC:
root@am335x:~# gpiodetect
gpiochip0 [omap-gpmc] (2 lines)
gpiochip1 [gpio-0-31] (32 lines)
gpiochip2 [gpio-32-63] (32 lines)
gpiochip3 [gpio-64-95] (32 lines)
gpiochip4 [gpio-96-127] (32 lines)