Thread (1 message) 1 message, 1 author, 2016-10-19
DORMANTno replies

[PATCH 2/5] drivers: gpio: Add support for multiple IPs

From: Keerthy <hidden>
Date: 2016-10-19 05:33:56
Also in: linux-gpio, linux-omap
Subsystem: gpio subsystem, the rest, ti davinci series gpio driver · Maintainers: Linus Walleij, Bartosz Golaszewski, Linus Torvalds, Keerthy

Possibly related (same subject, not in this thread)

From: Lokesh Vutla <redacted>

Update GPIO driver to support Multiple GPIO IPs.

Signed-off-by: Lokesh Vutla <redacted>
Signed-off-by: Keerthy <redacted>
---
 drivers/gpio/gpio-davinci.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
index 419cfaf..2654dae 100644
--- a/drivers/gpio/gpio-davinci.c
+++ b/drivers/gpio/gpio-davinci.c
@@ -183,6 +183,7 @@ static int davinci_gpio_probe(struct platform_device *pdev)
 	struct davinci_gpio_regs __iomem *regs;
 	struct device *dev = &pdev->dev;
 	struct resource *res;
+	static int bank_base;
 
 	pdata = davinci_gpio_get_pdata(pdev);
 	if (!pdata) {
@@ -226,7 +227,8 @@ static int davinci_gpio_probe(struct platform_device *pdev)
 		chips[i].chip.direction_output = davinci_direction_out;
 		chips[i].chip.set = davinci_gpio_set;
 
-		chips[i].chip.base = base;
+		chips[i].chip.base = bank_base;
+		bank_base += 32;
 		chips[i].chip.ngpio = ngpio - base;
 		if (chips[i].chip.ngpio > 32)
 			chips[i].chip.ngpio = 32;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help