ASoC: rt5677: handle concurrent interrupts
authorBen Zhang <benzh@chromium.org>
Tue, 18 Jun 2019 23:45:55 +0000 (17:45 -0600)
committerMark Brown <broonie@kernel.org>
Wed, 19 Jun 2019 11:46:44 +0000 (12:46 +0100)
commitdf9091e9d3f4500bc6fb15f5d2a1c2614f67004c
treea41e8bc8b26d6b913c51d193ce94af6ce6e07362
parent4f7b018b55db0361718161e1471d8b7a16fdfa47
ASoC: rt5677: handle concurrent interrupts

The rt5677 driver writes to the IRQ control register within the IRQ
handler in order to flip the polarity of the interrupts that have been
signalled.  If an interrupt fires in the interval between the
regmap_read and the regmap_write, it will not trigger a new call to
rt5677_irq.

Add a bounded loop to rt5677_irq that keeps checking interrupts until
none are seen, so that any interrupts that are signalled in that
interval are correctly handled.

Signed-off-by: Ben Zhang <benzh@chromium.org>
Signed-off-by: Fletcher Woodruff <fletcherw@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt5677.c