[PATCH] ASoC: cs42xx8: Restore cache-only mode on resume failure

From: Haowen Tu

Date: Wed Nov 18 2026 - 03:24:47 EST


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@xxxxxxxxxxxxx>
---
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