aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/wm831x-irq.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-02-01 06:46:13 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2011-03-23 05:41:46 -0400
commit8546bd4af1251d17d16b0ef682d84fd23c8beaca (patch)
treef032524ccacd1b9df03f499e4e94ac5a4dd9ce78 /drivers/mfd/wm831x-irq.c
parent87d1906df4ecf6df0832e78e5189a39c7ea09a29 (diff)
mfd: Add fast path for WM831x touchscreen interrupts
The WM831x interrupt controller provides reporting of the touchscreen related interrupts in the primary interrupt status register as a performance optimisation - use this to avoid reading the secondary status registers for those interrupts. For code simplicity and to avoid iterating over all interrupts we open code for the two affected interrupt sources. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/wm831x-irq.c')
-rw-r--r--drivers/mfd/wm831x-irq.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/mfd/wm831x-irq.c b/drivers/mfd/wm831x-irq.c
index 90ad3fa91329..03eb61dd0965 100644
--- a/drivers/mfd/wm831x-irq.c
+++ b/drivers/mfd/wm831x-irq.c
@@ -449,6 +449,18 @@ static irqreturn_t wm831x_irq_thread(int irq, void *data)
449 goto out; 449 goto out;
450 } 450 }
451 451
452 /* The touch interrupts are visible in the primary register as
453 * an optimisation; open code this to avoid complicating the
454 * main handling loop and so we can also skip iterating the
455 * descriptors.
456 */
457 if (primary & WM831X_TCHPD_INT)
458 handle_nested_irq(wm831x->irq_base + WM831X_IRQ_TCHPD);
459 if (primary & WM831X_TCHDATA_INT)
460 handle_nested_irq(wm831x->irq_base + WM831X_IRQ_TCHDATA);
461 if (primary & (WM831X_TCHDATA_EINT | WM831X_TCHPD_EINT))
462 goto out;
463
452 for (i = 0; i < ARRAY_SIZE(wm831x_irqs); i++) { 464 for (i = 0; i < ARRAY_SIZE(wm831x_irqs); i++) {
453 int offset = wm831x_irqs[i].reg - 1; 465 int offset = wm831x_irqs[i].reg - 1;
454 466