Re: [3.14 FIX][PATCH] MIPS: BCM47XX: Check all (32) GPIOs when looking for a pin

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

 



On 02/13/2014 05:48 PM, Rafał Miłecki wrote:
> Broadcom boards support 32 GPIOs and NVRAM may have entires for higher
> ones too. Example:
> gpio23=wombo_reset
> 
> Signed-off-by: Rafał Miłecki <zajec5@xxxxxxxxx>

Acked-by: Hauke Mehrtens <hauke@xxxxxxxxxx>

> ---
> Preferably this should go as a fix for 3.14. It's really trivial and
> allows support for some devices that require reset by GPIO after boot.
> ---
>  arch/mips/bcm47xx/nvram.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/mips/bcm47xx/nvram.c b/arch/mips/bcm47xx/nvram.c
> index 6decb27..2bed73a 100644
> --- a/arch/mips/bcm47xx/nvram.c
> +++ b/arch/mips/bcm47xx/nvram.c
> @@ -196,7 +196,7 @@ int bcm47xx_nvram_gpio_pin(const char *name)
>  	char nvram_var[10];
>  	char buf[30];
>  
> -	for (i = 0; i < 16; i++) {
> +	for (i = 0; i < 32; i++) {
>  		err = snprintf(nvram_var, sizeof(nvram_var), "gpio%i", i);
>  		if (err <= 0)
>  			continue;
> 



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux