diff options
author | Yegor Yefremov <yegorslists@googlemail.com> | 2022-07-06 10:06:39 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-07-12 07:52:11 +0200 |
commit | d0c9fd25e71e842cd6b787d141a998759cca9044 (patch) | |
tree | 52684e370d1e56e2266f3421b79d88c2231b67d9 /arch/arm/boards/vscom-baltos | |
parent | 09c4f3651085ed1761faf231c339e8c8e247bb0b (diff) | |
download | barebox-d0c9fd25e71e842cd6b787d141a998759cca9044.tar.gz barebox-d0c9fd25e71e842cd6b787d141a998759cca9044.tar.xz |
ARM: baltos: use GPIO names for TCA6416 chip
Switch to gpio_find_by_name() method to get the required GPIO lines.
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Link: https://lore.barebox.org/20220706080639.13588-1-yegorslists@googlemail.com
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/boards/vscom-baltos')
-rw-r--r-- | arch/arm/boards/vscom-baltos/board.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/arch/arm/boards/vscom-baltos/board.c b/arch/arm/boards/vscom-baltos/board.c index 83c7dbc8b0..9229df09d4 100644 --- a/arch/arm/boards/vscom-baltos/board.c +++ b/arch/arm/boards/vscom-baltos/board.c @@ -140,10 +140,15 @@ static int baltos_read_eeprom(void) /* configure output signals of the external GPIO controller */ if (hw_param.SystemId == 210 || hw_param.SystemId == 211) { - gpio_direction_output(132, 0); - gpio_direction_output(133, 0); - gpio_direction_output(134, 0); - gpio_direction_output(135, 0); + int outs[4]; + outs[0] = gpio_find_by_name("GP_OUT0"); + outs[1] = gpio_find_by_name("GP_OUT1"); + outs[2] = gpio_find_by_name("GP_OUT2"); + outs[3] = gpio_find_by_name("GP_OUT3"); + gpio_direction_output(outs[0], 0); + gpio_direction_output(outs[1], 0); + gpio_direction_output(outs[2], 0); + gpio_direction_output(outs[3], 0); } dip = get_dip_switch(hw_param.SystemId, hw_param.HwRev); |