mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-12-04 21:10:57 -06:00
ASoC: codecs: wsa881x: Propagate regcache_sync() errors
wsa881x_runtime_resume() powers the device up, waits for SoundWire initialization, leaves cache-only mode, and replays cached register state. It currently ignores regcache_sync() failures and returns success. Propagate sync failures, restore cache-only/dirty state, and undo the shutdown GPIO state acquired by resume. Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn> Link: https://patch.msgid.link/20260704074434.54200-1-pengpeng@iscas.ac.cn Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
@@ -1178,7 +1178,13 @@ static int wsa881x_runtime_resume(struct device *dev)
|
||||
}
|
||||
|
||||
regcache_cache_only(regmap, false);
|
||||
regcache_sync(regmap);
|
||||
ret = regcache_sync(regmap);
|
||||
if (ret) {
|
||||
regcache_cache_only(regmap, true);
|
||||
regcache_mark_dirty(regmap);
|
||||
gpiod_direction_output(wsa881x->sd_n, 1);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user