Thread (840 messages) 840 messages, 15 authors, 2021-07-20
STALE1811d

[PATCH 5.13 605/800] ASoC: rt5682: Disable irq on shutdown

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: 2021-07-12 09:03:21
Also in: lkml
Subsystem: realtek audio codecs, sound, sound - soc layer / dynamic audio power management (asoc), the rest · Maintainers: Oder Chiou, Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Mark Brown, Linus Torvalds

From: Stephen Boyd <redacted>

[ Upstream commit 47bcb1c7108363418cd578283333d72e310dfeaa ]

We cancel the work queues, and reset the device on shutdown, but the irq
isn't disabled so the work queues could be queued again. Let's disable
the irq during shutdown so that we don't have to worry about this device
trying to do anything anymore. This fixes a problem seen where the i2c
bus is shutdown at reboot but this device irq still comes in and tries
to make another i2c transaction when the bus doesn't work.

Cc: Jairaj Arava <redacted>
Cc: Sathyanarayana Nujella <redacted>
Cc: Pierre-Louis Bossart <redacted>
Cc: Shuming Fan <redacted>
Cc: Ranjani Sridharan <redacted>
Fixes: 45a2702ce109 ("ASoC: rt5682: Fix panic in rt5682_jack_detect_handler happening during system shutdown")
Signed-off-by: Stephen Boyd <redacted>
Link: https://lore.kernel.org/r/20210508075151.1626903-1-swboyd@chromium.org (local)
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/soc/codecs/rt5682-i2c.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/sound/soc/codecs/rt5682-i2c.c b/sound/soc/codecs/rt5682-i2c.c
index 8ea9f1d9fec0..cd964e023d96 100644
--- a/sound/soc/codecs/rt5682-i2c.c
+++ b/sound/soc/codecs/rt5682-i2c.c
@@ -273,6 +273,7 @@ static void rt5682_i2c_shutdown(struct i2c_client *client)
 {
 	struct rt5682_priv *rt5682 = i2c_get_clientdata(client);
 
+	disable_irq(client->irq);
 	cancel_delayed_work_sync(&rt5682->jack_detect_work);
 	cancel_delayed_work_sync(&rt5682->jd_check_work);
 
-- 
2.30.2


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help