diff options
author | John Hsu <KCHSU0@nuvoton.com> | 2017-11-29 21:13:17 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-11-30 07:28:18 -0500 |
commit | e3fee43a968fd39dcc56be3757fcdfe250964125 (patch) | |
tree | 5042d7946829ac30551f416a4ffdb685d16e53f0 | |
parent | 226d7449135ffc62866c06d73b28cac90b3f31e4 (diff) |
ASoC: nau8825: set clear_irq when imm IRQ happened
Although the crosstalk is disabled, it is better to set clear_irq
properly when the impedance measurement interrupt happens.
It can avoid that the driver clears other IRQs by accident
if the active_irq has another IRQ events.
Signed-off-by: John Hsu <KCHSU0@nuvoton.com>
Reviewed-by: Wu-Cheng Li <wuchengli@chromium.org>
Tested-by: Wu-Cheng Li <wuchengli@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/codecs/nau8825.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/codecs/nau8825.c b/sound/soc/codecs/nau8825.c index d3c1a02f1e15..603cd72c2a25 100644 --- a/sound/soc/codecs/nau8825.c +++ b/sound/soc/codecs/nau8825.c | |||
@@ -1733,10 +1733,9 @@ static irqreturn_t nau8825_interrupt(int irq, void *data) | |||
1733 | nau8825->xtalk_event_mask = event_mask; | 1733 | nau8825->xtalk_event_mask = event_mask; |
1734 | } | 1734 | } |
1735 | } else if (active_irq & NAU8825_IMPEDANCE_MEAS_IRQ) { | 1735 | } else if (active_irq & NAU8825_IMPEDANCE_MEAS_IRQ) { |
1736 | if (nau8825->xtalk_enable) { | 1736 | if (nau8825->xtalk_enable) |
1737 | schedule_work(&nau8825->xtalk_work); | 1737 | schedule_work(&nau8825->xtalk_work); |
1738 | clear_irq = NAU8825_IMPEDANCE_MEAS_IRQ; | 1738 | clear_irq = NAU8825_IMPEDANCE_MEAS_IRQ; |
1739 | } | ||
1740 | } else if ((active_irq & NAU8825_JACK_INSERTION_IRQ_MASK) == | 1739 | } else if ((active_irq & NAU8825_JACK_INSERTION_IRQ_MASK) == |
1741 | NAU8825_JACK_INSERTION_DETECTED) { | 1740 | NAU8825_JACK_INSERTION_DETECTED) { |
1742 | /* One more step to check GPIO status directly. Thus, the | 1741 | /* One more step to check GPIO status directly. Thus, the |