On Wed, Jul 06, 2022 at 10:06:39AM +0200, [email protected] wrote:
> From: Yegor Yefremov <[email protected]>
> 
> Switch to gpio_find_by_name() method to get the required GPIO lines.
> 
> Signed-off-by: Yegor Yefremov <[email protected]>
> ---
>  arch/arm/boards/vscom-baltos/board.c   | 13 +++++++++----
>  arch/arm/dts/am335x-baltos-minimal.dts |  4 ++++
>  2 files changed, 13 insertions(+), 4 deletions(-)

Applied, thanks

Sascha

> 
> 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);
> diff --git a/arch/arm/dts/am335x-baltos-minimal.dts 
> b/arch/arm/dts/am335x-baltos-minimal.dts
> index e55a2d7cbb..1544e2cc29 100644
> --- a/arch/arm/dts/am335x-baltos-minimal.dts
> +++ b/arch/arm/dts/am335x-baltos-minimal.dts
> @@ -285,6 +285,10 @@
>               interrupts = <20 GPIO_ACTIVE_LOW>;
>               pinctrl-names = "default";
>               pinctrl-0 = <&tca6416_pins>;
> +             gpio-line-names = "GP_IN0", "GP_IN1", "GP_IN2", "GP_IN3",
> +                               "GP_OUT0", "GP_OUT1", "GP_OUT2", "GP_OUT3",
> +                               "ModeA0", "ModeA1", "ModeA2", "ModeA3",
> +                               "ModeB0", "ModeB1", "ModeB2", "ModeB3";
>       };
>  };
>  
> -- 
> 2.17.0
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Reply via email to