[PATCH 2/6] mfd: max77686: Apply irq_mask_cur before handling interrupts.

From: Yadwinder Singh Brar
Date: Wed Jul 04 2012 - 23:59:22 EST


According to TRM, though we mask the interrupts in interrupt-mask register,
interrupt source-register still provide the status of the masked interrupts.
So we should apply irq_mask_cur to read interrupt source-register value before
handling.

Signed-off-by: Yadwinder Singh Brar <yadi.brar@xxxxxxxxxxx>
---
drivers/mfd/max77686-irq.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/mfd/max77686-irq.c b/drivers/mfd/max77686-irq.c
index 09e593a..0758fac 100644
--- a/drivers/mfd/max77686-irq.c
+++ b/drivers/mfd/max77686-irq.c
@@ -208,6 +208,9 @@ static irqreturn_t max77686_irq_thread(int irq, void *data)

}

+ for (i = 0; i < MAX77686_IRQ_GROUP_NR; i++)
+ irq_reg[i] &= ~max77686->irq_masks_cur[i];
+
for (i = 0; i < MAX77686_IRQ_NR; i++) {
if (irq_reg[max77686_irqs[i].group] & max77686_irqs[i].mask) {
cur_irq = irq_find_mapping(max77686->irq_domain, i);
--
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/