[PATCH 7/8] gpio: mvebu_gpio: Set bank name to mvebu%d

Stefan Roese sr at denx.de
Thu Jul 28 08:29:03 CEST 2022


On 25.07.22 13:56, Pali Rohár wrote:
> Currently bank name is just one alphabetical letter.
> Change it to mvebu and number.
> 
> Signed-off-by: Pali Rohár <pali at kernel.org>

Reviewed-by: Stefan Roese <sr at denx.de>

Thanks,
Stefan

> ---
>   drivers/gpio/mvebu_gpio.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpio/mvebu_gpio.c b/drivers/gpio/mvebu_gpio.c
> index 55ed685f70f8..f706a6dfa4fe 100644
> --- a/drivers/gpio/mvebu_gpio.c
> +++ b/drivers/gpio/mvebu_gpio.c
> @@ -23,7 +23,7 @@ struct mvebu_gpio_regs {
>   
>   struct mvebu_gpio_priv {
>   	struct mvebu_gpio_regs *regs;
> -	char name[2];
> +	char name[sizeof("mvebuX_")];
>   };
>   
>   static int mvebu_gpio_direction_input(struct udevice *dev, unsigned int gpio)
> @@ -93,7 +93,7 @@ static int mvebu_gpio_probe(struct udevice *dev)
>   
>   	priv->regs = dev_read_addr_ptr(dev);
>   	uc_priv->gpio_count = dev_read_u32_default(dev, "ngpios", MVEBU_GPIOS_PER_BANK);
> -	priv->name[0] = 'A' + dev_seq(dev);
> +	sprintf(priv->name, "mvebu%d_", dev_seq(dev));
>   	uc_priv->bank_name = priv->name;
>   
>   	return 0;

Viele Grüße,
Stefan Roese

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de


More information about the U-Boot mailing list