mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-01 10:33:27 +00:00
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>
This commit is contained in:
parent
f8beab2bb6
commit
d23511f959
1 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue