crossystem: Add support for multiple gpiochip entries
The current logic for finding a GPIO expects only one gpiochip
entry to exist in /sys/class/gpio. With Samus there is a second
entry because the codec also exports a set of GPIOs.
To solve this we can use the gpiochip#/label file and compare
against the GPIO controller name described in ACPI.
This adds support for that detection method, as well as a new
GPIO controller entry for INT3437:00 which is used in Broadwell
TEST=crossytem wpsw_cur works on samus (TOT with enabled codec)
Signed-off-by: Duncan Laurie <email@example.com>
Reviewed-by: Bill Richardson <firstname.lastname@example.org>
(cherry picked from commit 8bb3689d42089241b209ccea2860f03aeaddd8f8)
Commit-Queue: Ricky Liang <email@example.com>
Tested-by: Ricky Liang <firstname.lastname@example.org>
Reviewed-by: Duncan Laurie <email@example.com>
1 file changed