From: bigeasy@linutronix.de (Sebastian Andrzej Siewior)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/6] i2c/pxa2xx: add support for shared IRQ handler
Date: Wed, 5 Jan 2011 17:51:01 +0100 [thread overview]
Message-ID: <1294246263-31960-5-git-send-email-bigeasy@linutronix.de> (raw)
In-Reply-To: <1294246263-31960-1-git-send-email-bigeasy@linutronix.de>
Sodaville has three of them on a single IRQ. IRQF_DISABLED is removed
because it is a NOP allready and scheduled for removal.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
---
drivers/i2c/busses/i2c-pxa.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index 225e9a5..e566f8c 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -956,11 +956,17 @@ static void i2c_pxa_irq_rxfull(struct pxa_i2c *i2c, u32 isr)
writel(icr, _ICR(i2c));
}
+#define VALID_INT_SOURCE (ISR_SSD | ISR_ALD | ISR_ITE | ISR_IRF | \
+ ISR_SAD | ISR_BED)
static irqreturn_t i2c_pxa_handler(int this_irq, void *dev_id)
{
struct pxa_i2c *i2c = dev_id;
u32 isr = readl(_ISR(i2c));
+ isr &= VALID_INT_SOURCE;
+ if (!isr)
+ return IRQ_NONE;
+
if (i2c_debug > 2 && 0) {
dev_dbg(&i2c->adap.dev, "%s: ISR=%08x, ICR=%08x, IBMR=%02x\n",
__func__, isr, readl(_ICR(i2c)), readl(_IBMR(i2c)));
@@ -975,7 +981,7 @@ static irqreturn_t i2c_pxa_handler(int this_irq, void *dev_id)
/*
* Always clear all pending IRQs.
*/
- writel(isr & (ISR_SSD|ISR_ALD|ISR_ITE|ISR_IRF|ISR_SAD|ISR_BED), _ISR(i2c));
+ writel(isr, _ISR(i2c));
if (isr & ISR_SAD)
i2c_pxa_slave_start(i2c, isr);
@@ -1120,7 +1126,7 @@ static int i2c_pxa_probe(struct platform_device *dev)
i2c->adap.algo = &i2c_pxa_pio_algorithm;
} else {
i2c->adap.algo = &i2c_pxa_algorithm;
- ret = request_irq(irq, i2c_pxa_handler, IRQF_DISABLED,
+ ret = request_irq(irq, i2c_pxa_handler, IRQF_SHARED,
i2c->adap.name, i2c);
if (ret)
goto ereqirq;
--
1.7.3.2
next prev parent reply other threads:[~2011-01-05 16:51 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-05 16:50 I2C support for CE4100, v3 Sebastian Andrzej Siewior
2011-01-05 16:50 ` [PATCH 1/6] i2c/pxa: use dynamic register layout Sebastian Andrzej Siewior
2011-01-05 16:50 ` [PATCH 2/6] arm/pxa2xx: reorganize I2C files Sebastian Andrzej Siewior
2011-01-05 16:51 ` [PATCH 3/6] i2c/pxa2xx: Add PCI support for PXA I2C controller Sebastian Andrzej Siewior
2011-01-05 20:21 ` Ben Dooks
2011-01-05 22:18 ` Sebastian Andrzej Siewior
2011-01-14 14:31 ` Sebastian Andrzej Siewior
2011-02-07 17:56 ` Sebastian Andrzej Siewior
2011-02-23 1:14 ` Ben Dooks
2011-01-05 23:03 ` Russell King - ARM Linux
2011-01-05 23:08 ` Greg KH
2011-01-06 9:20 ` Russell King - ARM Linux
2011-01-06 21:57 ` Greg KH
2011-01-07 12:31 ` [PATCH] i2c-pxa2xx: " Sebastian Andrzej Siewior
2011-01-06 10:50 ` [PATCH 3/6] i2c/pxa2xx: " Sebastian Andrzej Siewior
2011-01-06 11:12 ` Russell King - ARM Linux
2011-01-06 11:50 ` Sebastian Andrzej Siewior
2011-01-07 15:57 ` Grant Likely
2011-01-05 16:51 ` Sebastian Andrzej Siewior [this message]
2011-01-05 16:51 ` [PATCH 5/6] i2c/pxa2xx: check timeout correctly Sebastian Andrzej Siewior
2011-01-05 16:51 ` [PATCH 6/6] i2c/pxa2xx: pass of_node from platform driver to adapter and publish Sebastian Andrzej Siewior
2011-01-21 19:32 ` Grant Likely
2011-01-05 21:51 ` I2C support for CE4100, v3 Ben Dooks
2011-01-07 11:20 ` Sebastian Andrzej Siewior
-- strict thread matches above, loose matches on Subject: below --
2010-12-02 20:09 I2C support for CE4100, v2 Sebastian Andrzej Siewior
2010-12-02 20:09 ` [PATCH 4/6] i2c/pxa2xx: add support for shared IRQ handler Sebastian Andrzej Siewior
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=1294246263-31960-5-git-send-email-bigeasy@linutronix.de \
--to=bigeasy@linutronix.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;
as well as URLs for NNTP newsgroup(s).