svxlink
svxlink copied to clipboard
Issue 538 - Not complete solution
I am finding that the solution implemented in #538 is not a complete solution that still leaves the initial issue of moving gpio locations unresolved when using the gpiochip### approach
The solution as implemented yields a config file such as the following from how I am reading the manual.
SQL_DET=GPIOD SQL_GPIOD_CHIP=gpiochip472 SQL_GPIOD_LINE= 8
However, there is still a race condition in the OS devicetree where the sequence of gpio number assignment is unpredictable. With 2@gpioexpanders (MCP23017 as examples) installed on my current hw platform, I get the following behavior, the first boot the device at address 1-0027 (i2c bus 1, device address 27) will randomly be assigned either 472 or 464 as the starting address. We need a way to also include the i2c address to guarantee the right offset is assigned.
$ cat /sys/bus/i2c/devices/1-0027/gpio/gpiochip472/ngpio warm reboot $ cat /sys/bus/i2c/devices/1-0027/gpio/gpiochip464/ngpio