aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-11-28 13:50:39 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-11-28 13:51:57 -0500
commitd23511f9590870effa5ace575b59aac18c47175f (patch)
treec30929de930763a8a4930a171478dca9d414dfc3 /drivers/base
parentf8beab2bb611d735767871e0e1a12dc6a0def7b1 (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>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/regmap/regmap-irq.c7
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)
100 u8 *buf8 = data->status_reg_buf; 100 u8 *buf8 = data->status_reg_buf;
101 u16 *buf16 = data->status_reg_buf; 101 u16 *buf16 = data->status_reg_buf;
102 u32 *buf32 = data->status_reg_buf; 102 u32 *buf32 = data->status_reg_buf;
103 bool handled = false;
103 104
104 ret = regmap_bulk_read(map, chip->status_base, data->status_reg_buf, 105 ret = regmap_bulk_read(map, chip->status_base, data->status_reg_buf,
105 chip->num_regs); 106 chip->num_regs);
@@ -146,10 +147,14 @@ static irqreturn_t regmap_irq_thread(int irq, void *d)
146 if (data->status_buf[chip->irqs[i].reg_offset] & 147 if (data->status_buf[chip->irqs[i].reg_offset] &
147 chip->irqs[i].mask) { 148 chip->irqs[i].mask) {
148 handle_nested_irq(data->irq_base + i); 149 handle_nested_irq(data->irq_base + i);
150 handled = true;
149 } 151 }
150 } 152 }
151 153
152 return IRQ_HANDLED; 154 if (handled)
155 return IRQ_HANDLED;
156 else
157 return IRQ_NONE;
153} 158}
154 159
155/** 160/**