In case the hardware interrupt mask register does not prevent the chip level irq from being asserted by the corresponding interrupt status bit, stray masked interrupts should to be acknowledged, too.
Signed-off-by: Philipp Zabel <[email protected]> --- I have seen GPI interrupts trigger on DA9063 trigger after being masked during initialization, and once the status bits are set, the interrupt handler routine never clears them, which keeps the chip irq line asserted forever. --- drivers/base/regmap/regmap-irq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c index 1643e88..0bdf43f 100644 --- a/drivers/base/regmap/regmap-irq.c +++ b/drivers/base/regmap/regmap-irq.c @@ -253,8 +253,6 @@ static irqreturn_t regmap_irq_thread(int irq, void *d) * doing a write per register. */ for (i = 0; i < data->chip->num_regs; i++) { - data->status_buf[i] &= ~data->mask_buf[i]; - if (data->status_buf[i] && chip->ack_base) { reg = chip->ack_base + (i * map->reg_stride * data->irq_reg_stride); @@ -263,6 +261,8 @@ static irqreturn_t regmap_irq_thread(int irq, void *d) dev_err(map->dev, "Failed to ack 0x%x: %d\n", reg, ret); } + + data->status_buf[i] &= ~data->mask_buf[i]; } for (i = 0; i < chip->num_irqs; i++) { -- 1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

