RE: [PATCH] gpio: mmio: do not calculate bgpio_bits via "ngpios"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am not sure this change is needed?
When I initially submitted " gpio: mmio: handle "ngpios" properly in bgpio_init() ", It was specifically because I have a 32bit reg access but only 16 gpios. Initially, I did not add the else and so Andy suggested to add it with the roundup_pow_of_two to stay backward compatible. If your system is a 32 bit arch and you only use 16 Gpio bits, why don't you configure that in your DTS?

Thanks.
Asmaa

>  drivers/gpio/gpio-mmio.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/gpio/gpio-mmio.c b/drivers/gpio/gpio-mmio.c index
> 71e1af7c2184..d89e78f0ead3 100644
> --- a/drivers/gpio/gpio-mmio.c
> +++ b/drivers/gpio/gpio-mmio.c
> @@ -619,8 +619,6 @@ int bgpio_init(struct gpio_chip *gc, struct device *dev,
>  	ret = gpiochip_get_ngpios(gc, dev);
>  	if (ret)
>  		gc->ngpio = gc->bgpio_bits;
> -	else
> -		gc->bgpio_bits = roundup_pow_of_two(round_up(gc->ngpio,
> 8));
> 
>  	ret = bgpio_setup_io(gc, dat, set, clr, flags);
>  	if (ret)
> --
> 2.45.1





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux