linux-mips
[Top] [All Lists]

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

To: linux-mips@linux-mips.org, Ralf Baechle <ralf@linux-mips.org>
Subject: [3.14 FIX][PATCH] MIPS: BCM47XX: Check all (32) GPIOs when looking for a pin
From: Rafał Miłecki <zajec5@gmail.com>
Date: Thu, 13 Feb 2014 17:48:12 +0100
Cc: Hauke Mehrtens <hauke@hauke-m.de>, Rafał Miłecki <zajec5@gmail.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=2241Q3hN//Ib4KNWFLxFCChEzIN9kejc8+eY10/1w6I=; b=Gk6awRvQR3dnt0h+VCU3g9mmu0BqGHHPXKQB5LX9eT00as6eoU0TfAwAazWzzYICpn B/JFX4Hk5CXsZEoYGc6YdEVMqqTzMSRiXQ2ynskT+pBelzOdnu3RFtJsWo5bngHhHIov kV5VZ0tjuRg+OyO75I9AENpVHQilnL3JbemDnI800c/Zs1CC7qfxU1dEelohfosMlhh/ 5TiUKfAJyQnmjoWBDSCM6enE2UaSYUlEFQJGwjNAaKnBarRdJh9pU3bya1kAqh1X9bQg 7qt+gs25cFMtCyYl0ealgtxHVAEKsYVZIL5JHqmhIJ9+hdBo3uWTY0MXP12CfznlIEbP xdkA==
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
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@gmail.com>
---
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;
-- 
1.8.4.5


<Prev in Thread] Current Thread [Next in Thread>