]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ASoC: nau8821: Consistently clear interrupts before unmasking
authorCristian Ciocaltea <cristian.ciocaltea@collabora.com>
Fri, 3 Oct 2025 18:03:25 +0000 (21:03 +0300)
committerMark Brown <broonie@kernel.org>
Mon, 13 Oct 2025 12:18:00 +0000 (13:18 +0100)
commita698679fe8b0fec41d1fb9547a53127a85c1be92
tree48c467ebb74ee57cd8fbf8de9ce6028e7958e623
parent9273aa85b35cc02d0953a1ba3b7bd694e5a2c10e
ASoC: nau8821: Consistently clear interrupts before unmasking

The interrupt handler attempts to perform some IRQ status clear
operations *after* rather than *before* unmasking and enabling
interrupts.  This is a rather fragile approach since it may generally
lead to missing IRQ requests or causing spurious interrupts.

Make use of the nau8821_irq_status_clear() helper instead of
manipulating the related register directly and ensure any interrupt
clearing is performed *after* the target interrupts are disabled/masked
and *before* proceeding with additional interrupt unmasking/enablement
operations.

This also implicitly drops the redundant clear operation of the ejection
IRQ in the interrupt handler, since nau8821_eject_jack() has been
already responsible for clearing all active interrupts.

Fixes: aab1ad11d69f ("ASoC: nau8821: new driver")
Fixes: 2551b6e89936 ("ASoC: nau8821: Add headset button detection")
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Link: https://patch.msgid.link/20251003-nau8821-jdet-fixes-v1-3-f7b0e2543f09@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/nau8821.c