From: John Ogness <john.ogness@linutronix.de>
To: Sascha Hauer <kernel@pengutronix.de>
Cc: linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] MXC: set GPIO IRQ handler
Date: Wed, 25 Nov 2009 19:19:58 +0100 [thread overview]
Message-ID: <807htelb5d.fsf@merkur.tec.linutronix.de> (raw)
The irq chip function gpio_set_irq_type() correctly sets the i.MX
registers but does not set the irq handler. This means that all
gpio-based irq's are handled with handle_edge_irq().
This patch corrects this by also setting the appropriate handler.
This patch is against 2.6.32-rc8.
Signed-off-by: John Ogness <john.ogness@linutronix.de>
---
arch/arm/plat-mxc/gpio.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/arch/arm/plat-mxc/gpio.c
+++ b/arch/arm/plat-mxc/gpio.c
@@ -126,6 +126,11 @@ static int gpio_set_irq_type(u32 irq, u3
__raw_writel(val | (edge << (bit << 1)), reg);
_clear_gpio_irqstatus(port, gpio & 0x1f);
+ if (type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH))
+ __set_irq_handler_unlocked(irq, handle_level_irq);
+ else if (type & (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING))
+ __set_irq_handler_unlocked(irq, handle_edge_irq);
+
return 0;
}
next reply other threads:[~2009-11-25 18:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-25 18:19 John Ogness [this message]
2009-11-26 7:57 ` Uwe Kleine-König
2009-11-27 23:46 ` Thomas Gleixner
2009-11-29 20:27 ` Uwe Kleine-König
2009-11-30 9:32 ` Thomas Gleixner
2009-11-30 16:29 ` Uwe Kleine-König
2009-11-30 15:47 ` [PATCH] MAINTAINERS: add tree and file pattern for ARM IMX Uwe Kleine-König
2009-11-30 15:53 ` [PATCH v2] " Uwe Kleine-König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=807htelb5d.fsf@merkur.tec.linutronix.de \
--to=john.ogness@linutronix.de \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®