base-files: armsr: number Ten64 GPIOs according to kernel version
authorMathew McBride <matt@traverse.com.au>
Mon, 18 Mar 2024 02:03:55 +0000 (13:03 +1100)
committerDaniel Golle <daniel@makrotopia.org>
Tue, 7 May 2024 12:01:19 +0000 (13:01 +0100)
commit5f609d8960f0ad4f5bd59a69facaeb2739c6e625
treeb2234316a492d7281512eabb90c3f97258dd8951
parentc8927d7c01179cfbc9a6f7c51af2a5966eeaf780
base-files: armsr: number Ten64 GPIOs according to kernel version

A change in kernel 6.2[1] caused the base numbers of GPIOs to
change significantly on some architectures like aarch64.

We have to number our GPIOs accordingly.
Ideally the board.d scripts should look through sysfs
to find the basenum (like cat "/sys/devices/platform/soc/2000000.i2c/
i2c-0/0-0076/gpio/gpiochip640/base"), but the problem is
that this occurs before modules are loaded, meaning I2C and other
runtime devices may be missing.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
[1] https://lore.kernel.org/lkml/cover.1662116601.git.christophe.leroy@csgroup.eu/T/
target/linux/armsr/base-files/etc/board.d/03_gpio_switches