提交 bbae92ca 编写于 作者: M Mark Brown

regmap: irq: Factor register read out of the IRQ parsing loop

In preparation for adding back support for block reads.
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 55ac85e9
...@@ -170,13 +170,6 @@ static irqreturn_t regmap_irq_thread(int irq, void *d) ...@@ -170,13 +170,6 @@ static irqreturn_t regmap_irq_thread(int irq, void *d)
} }
} }
/*
* Ignore masked IRQs and ack if we need to; we ack early so
* there is no race between handling and acknowleding the
* interrupt. We assume that typically few of the interrupts
* will fire simultaneously so don't worry about overhead from
* doing a write per register.
*/
for (i = 0; i < data->chip->num_regs; i++) { for (i = 0; i < data->chip->num_regs; i++) {
ret = regmap_read(map, chip->status_base + (i * map->reg_stride ret = regmap_read(map, chip->status_base + (i * map->reg_stride
* data->irq_reg_stride), * data->irq_reg_stride),
...@@ -189,7 +182,16 @@ static irqreturn_t regmap_irq_thread(int irq, void *d) ...@@ -189,7 +182,16 @@ static irqreturn_t regmap_irq_thread(int irq, void *d)
pm_runtime_put(map->dev); pm_runtime_put(map->dev);
return IRQ_NONE; return IRQ_NONE;
} }
}
/*
* Ignore masked IRQs and ack if we need to; we ack early so
* there is no race between handling and acknowleding the
* interrupt. We assume that typically few of the interrupts
* will fire simultaneously so don't worry about overhead from
* doing a write per register.
*/
for (i = 0; i < data->chip->num_regs; i++) {
data->status_buf[i] &= ~data->mask_buf[i]; data->status_buf[i] &= ~data->mask_buf[i];
if (data->status_buf[i] && chip->ack_base) { if (data->status_buf[i] && chip->ack_base) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册