linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] gpio: tegra: create irq mapping in gpio_to_irq
@ 2012-11-07 15:01 Laxman Dewangan
  2012-11-07 15:01 ` [PATCH 2/2] gpio: tegra: fix suspend/resume apis Laxman Dewangan
       [not found] ` <1352300492-24779-1-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  0 siblings, 2 replies; 6+ messages in thread
From: Laxman Dewangan @ 2012-11-07 15:01 UTC (permalink / raw)
  To: linus.walleij-QSEj5FYQhm4dnm+yROfE0A,
	grant.likely-s3s/WqlpOiPyB63q8FvJNQ
  Cc: swarren-DDmLM1+adcrQT0dZR+AlfA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Laxman Dewangan

The gpio interrupts get mapped linearly and hence the mapping
of irq need to be created by irq_create_mapping().

The function gpio_to_irq() returns the irq by irq_find_mapping()
and so returns 0 as there is no mapping created. Fix the function
to create mapping when gpio_to_irq() get called.

Signed-off-by: Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 drivers/gpio/gpio-tegra.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index c7c175a..6c08613 100644
--- a/drivers/gpio/gpio-tegra.c
+++ b/drivers/gpio/gpio-tegra.c
@@ -156,7 +156,7 @@ static int tegra_gpio_direction_output(struct gpio_chip *chip, unsigned offset,
 
 static int tegra_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
 {
-	return irq_find_mapping(irq_domain, offset);
+	return irq_create_mapping(irq_domain, offset);
 }
 
 static struct gpio_chip tegra_gpio_chip = {
-- 
1.7.1.1

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

end of thread, other threads:[~2012-11-08 21:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-07 15:01 [PATCH 1/2] gpio: tegra: create irq mapping in gpio_to_irq Laxman Dewangan
2012-11-07 15:01 ` [PATCH 2/2] gpio: tegra: fix suspend/resume apis Laxman Dewangan
     [not found]   ` <1352300492-24779-2-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-11-07 17:11     ` Stephen Warren
2012-11-08 21:24     ` Linus Walleij
     [not found] ` <1352300492-24779-1-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-11-07 17:08   ` [PATCH 1/2] gpio: tegra: create irq mapping in gpio_to_irq Stephen Warren
2012-11-08  4:29     ` Laxman Dewangan

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).