mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 10:09:10 +02:00
ASoC: rockchip: spdif: Restore regcache cache-only mode on sync failure
If regcache_sync() fails during runtime resume, the driver disables the clocks and returns an error. However, the regmap cache-only mode is left disabled. Restore cache-only mode in the error path so subsequent register accesses continue to use the cache while the device is inactive. Reported-by: Sashiko AI Review <sashiko-bot@kernel.org> Closes: https://lore.kernel.org/all/20260522103713.6C09D1F000E9@smtp.kernel.org/ Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Link: https://patch.msgid.link/20260602101608.45137-5-phucduc.bui@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
3168721d6e
commit
3546e9aa69
|
|
@ -94,6 +94,7 @@ static int rk_spdif_runtime_resume(struct device *dev)
|
|||
|
||||
ret = regcache_sync(spdif->regmap);
|
||||
if (ret) {
|
||||
regcache_cache_only(spdif->regmap, true);
|
||||
clk_disable_unprepare(spdif->mclk);
|
||||
clk_disable_unprepare(spdif->hclk);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user