Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH] ASoC: cs42xx8: Restore cache-only mode on resume failure
@ 2026-11-18  8:23 Haowen Tu
  2026-11-18  9:57 ` Charles Keepax
  0 siblings, 1 reply; 2+ messages in thread
From: Haowen Tu @ 2026-11-18  8:23 UTC (permalink / raw)
  To: broonie
  Cc: david.rhodes, rf, lgirdwood, perex, tiwai, linux-sound, patches,
	linux-kernel, Haowen Tu

The runtime resume callback leaves cache-only mode before synchronizing
the register cache. If regcache_sync() fails, it disables the supplies and
clock but leaves cache-only mode disabled. Subsequent register accesses
can therefore reach the unpowered device instead of using the cache.

Restore cache-only mode before disabling the supplies on a cache sync
failure, as the runtime suspend callback does before powering down.

Fixes: 0c516b4ff85c ("ASoC: cs42xx8: Add codec driver support for CS42448/CS42888")
Signed-off-by: Haowen Tu <tuhaowen@uniontech.com>
---
 sound/soc/codecs/cs42xx8.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/codecs/cs42xx8.c b/sound/soc/codecs/cs42xx8.c
index 94860e2802fe..797bb67eafca 100644
--- a/sound/soc/codecs/cs42xx8.c
+++ b/sound/soc/codecs/cs42xx8.c
@@ -671,6 +671,7 @@ static int cs42xx8_runtime_resume(struct device *dev)
 	return 0;
 
 err_bulk:
+	regcache_cache_only(cs42xx8->regmap, true);
 	regulator_bulk_disable(ARRAY_SIZE(cs42xx8->supplies),
 			       cs42xx8->supplies);
 err_clk:
-- 
2.50.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-18  9:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-18  8:23 [PATCH] ASoC: cs42xx8: Restore cache-only mode on resume failure Haowen Tu
2026-11-18  9:57 ` Charles Keepax

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox