Skip to content

Commit 02534c8

Browse files
charleskeepaxbroonie
authored andcommitted
regmap: regmap-irq: Move handle_post_irq to before pm_runtime_put
Typically handle_post_irq is going to be used to manage some additional chip specific hardware operations required on each IRQ, these are very likely to want the chip to be resumed. For example the current in tree user max77620 uses this to toggle a global mask bit, which would obviously want the device resumed. It is worth noting this device does not specify the runtime_pm flag in regmap_irq_chip, so there is no actual issue. Move the callback to before the pm_runtime_put, so it will be called whilst the device is still resumed. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230601101036.1499612-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 3a48d21 commit 02534c8

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/base/regmap/regmap-irq.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -502,12 +502,12 @@ static irqreturn_t regmap_irq_thread(int irq, void *d)
502502
}
503503

504504
exit:
505-
if (chip->runtime_pm)
506-
pm_runtime_put(map->dev);
507-
508505
if (chip->handle_post_irq)
509506
chip->handle_post_irq(chip->irq_drv_data);
510507

508+
if (chip->runtime_pm)
509+
pm_runtime_put(map->dev);
510+
511511
if (handled)
512512
return IRQ_HANDLED;
513513
else

0 commit comments

Comments
 (0)