提交 4fe2169a 编写于 作者: R Rafał Miłecki 提交者: Ralf Baechle

MIPS: BCM47XX: Check all (32) GPIOs when looking for a pin

Broadcom boards support 32 GPIOs and NVRAM may have entires for higher
ones too. Example:
gpio23=wombo_reset
Signed-off-by: NRafa? Mi?ecki <zajec5@gmail.com>
Acked-by: NHauke Mehrtens <hauke@hauke-m.de>
Cc: linux-mips@linux-mips.org
Cc: Rafał Miłecki <zajec5@gmail.com>
Patchwork: https://patchwork.linux-mips.org/patch/6547/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 e4362d1e
...@@ -196,7 +196,7 @@ int bcm47xx_nvram_gpio_pin(const char *name) ...@@ -196,7 +196,7 @@ int bcm47xx_nvram_gpio_pin(const char *name)
char nvram_var[10]; char nvram_var[10];
char buf[30]; 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); err = snprintf(nvram_var, sizeof(nvram_var), "gpio%i", i);
if (err <= 0) if (err <= 0)
continue; continue;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册