linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpio/davinci: add interrupt support for GPIOs 16-31
@ 2015-06-18 17:10 Vitaly Andrianov
  2015-07-14 14:01 ` Linus Walleij
  0 siblings, 1 reply; 6+ messages in thread
From: Vitaly Andrianov @ 2015-06-18 17:10 UTC (permalink / raw)
  To: linus.walleij, gnurou, linux-kernel, linux-gpio
  Cc: Vitaly Andrianov, Reece Pollack

Interrupts for GPIOs 16 through 31 are enabled by bit 1 in the
"binten" register (offset 8). Previous versions of GPIO only
used bit 0, which enables GPIO 0-15 interrupts.

Signed-off-by: Reece Pollack <x0183204@ti.com>
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
---
 drivers/gpio/gpio-davinci.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
index c5e05c8..c90629f 100644
--- a/drivers/gpio/gpio-davinci.c
+++ b/drivers/gpio/gpio-davinci.c
@@ -546,6 +546,8 @@ static int davinci_gpio_irq_setup(struct platform_device *pdev)
 		chips[0].gpio_irq = bank_irq;
 		chips[0].gpio_unbanked = pdata->gpio_unbanked;
 		binten = BIT(0);
+		if (pdata->gpio_unbanked > 16)
+			binten |= BIT(1);
 
 		/* AINTC handles mask/unmask; GPIO handles triggering */
 		irq = bank_irq;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-07-17 12:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-18 17:10 [PATCH] gpio/davinci: add interrupt support for GPIOs 16-31 Vitaly Andrianov
2015-07-14 14:01 ` Linus Walleij
2015-07-16  9:04   ` Sekhar Nori
2015-07-16 17:41     ` Vitaly Andrianov
2015-07-17  5:02       ` Sekhar Nori
2015-07-17 12:18         ` Vitaly Andrianov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).