diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-11-28 18:50:39 +0000 |
---|---|---|
committer | Lokesh Pathak <lpathak@nvidia.com> | 2012-03-05 07:54:50 -0800 |
commit | bbdf62cbce8305891dbd78a8a32626c1d7c69005 (patch) | |
tree | e35c03da720d0c29b2fd7505caf955c353a35ffb /drivers/base/regmap | |
parent | 818aa1fa992924adebb6d957484ef3af3bec0f75 (diff) |
regmap: Report if we actually handled an interrupt in regmap-irq
While the IRQ core doesn't currently support shared threaded interrupts
that's no reason for drivers not to do their bit and report IRQ_NONE when
they don't get an interrupt. This allows the core spurious/wedget interrupt
detection support to do its thing.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
(cherry picked from commit d23511f9590870effa5ace575b59aac18c47175f)
Change-Id: Iee387fd88ac0b5f542cbe171da92d9b621a94e30
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/87570
Diffstat (limited to 'drivers/base/regmap')
-rw-r--r-- | drivers/base/regmap/regmap-irq.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c index bd54f63be9ed..6b8a74c3ed18 100644 --- a/drivers/base/regmap/regmap-irq.c +++ b/drivers/base/regmap/regmap-irq.c @@ -100,6 +100,7 @@ static irqreturn_t regmap_irq_thread(int irq, void *d) u8 *buf8 = data->status_reg_buf; u16 *buf16 = data->status_reg_buf; u32 *buf32 = data->status_reg_buf; + bool handled = false; ret = regmap_bulk_read(map, chip->status_base, data->status_reg_buf, chip->num_regs); @@ -146,10 +147,14 @@ static irqreturn_t regmap_irq_thread(int irq, void *d) if (data->status_buf[chip->irqs[i].reg_offset] & chip->irqs[i].mask) { handle_nested_irq(data->irq_base + i); + handled = true; } } - return IRQ_HANDLED; + if (handled) + return IRQ_HANDLED; + else + return IRQ_NONE; } /** |