From: Philipp Zabel <p.zabel@pengutronix.de>
To: linux-kernel@vger.kernel.org
Cc: Mark Brown <broonie@kernel.org>, Philipp Zabel <p.zabel@pengutronix.de>
Subject: [PATCH] regmap: irq: Acknowledge also interrupts that are masked
Date: Mon, 22 Jul 2013 11:24:52 +0200 [thread overview]
Message-ID: <1374485092-13211-1-git-send-email-p.zabel@pengutronix.de> (raw)
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 <p.zabel@pengutronix.de>
---
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
next reply other threads:[~2013-07-22 9:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-22 9:24 Philipp Zabel [this message]
2013-07-22 10:08 ` [PATCH] regmap: irq: Acknowledge also interrupts that are masked Mark Brown
2013-07-22 11:11 ` Philipp Zabel
2013-07-22 13:30 ` Mark Brown
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=1374485092-13211-1-git-send-email-p.zabel@pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.