gpio: make more generic

Instead of assuming we're running on the PinePhone (and therefore
hardcoding gpiochip labels and line numbers), make all of those
configurable. Legacy config files will still be parsed as long as they
lack the `chips` key.

Existing config files are also updated to match the new config format.
This commit is contained in:
Arnaud Ferraris
2021-11-24 01:17:57 +01:00
parent f8b3e28434
commit abf60b793a
4 changed files with 152 additions and 64 deletions

View File

@@ -13,11 +13,12 @@ poweron_delay = 100000
#recovery_timeout = 9
[gpio]
dtr = 358
pwrkey = 35
reset = 68
apready = 231
disable = 232
chips = [ "1c20800.pinctrl", "1f02c00.pinctrl" ]
dtr = { chip = 1, line = 6 }
pwrkey = { chip = 0, line = 35 }
reset = { chip = 0, line = 68 }
apready = { chip = 0, line = 231 }
disable = { chip = 0, line = 232 }
[at]
uart = "/dev/ttyS2"