mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] gpiolib: wm8994: Fix irq offset for gpio_to_irq
@ 2014-08-12 11:44 Nikesh Oswal
  0 siblings, 0 replies; only message in thread
From: Nikesh Oswal @ 2014-08-12 11:44 UTC (permalink / raw)
  To: broonie, lgirdwood; +Cc: perex, tiwai, alsa-devel, linux-kernel, patches

Earlier code was using the gpio offset as is to get the irq.
For wm8994 driver the gpio related irq's starts from a fixed
offset as fixed by this patch.

Signed-off-by: Nikesh Oswal <nikesh@opensource.wolfsonmicro.com>
---
 drivers/gpio/gpio-wm8994.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-wm8994.c b/drivers/gpio/gpio-wm8994.c
index d93b6b5..dec47c2 100644
--- a/drivers/gpio/gpio-wm8994.c
+++ b/drivers/gpio/gpio-wm8994.c
@@ -113,7 +113,8 @@ static int wm8994_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
 	struct wm8994_gpio *wm8994_gpio = to_wm8994_gpio(chip);
 	struct wm8994 *wm8994 = wm8994_gpio->wm8994;
 
-	return regmap_irq_get_virq(wm8994->irq_data, offset);
+	return regmap_irq_get_virq(wm8994->irq_data,
+			WM8994_IRQ_GPIO(offset + 1));
 }
 
 
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-08-12 11:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-12 11:44 [PATCH] gpiolib: wm8994: Fix irq offset for gpio_to_irq Nikesh Oswal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®