mirror of
https://github.com/torvalds/linux.git
synced 2026-09-26 01:52:03 +02:00
ASoC: codecs: wm2200: Propagate regcache_sync() errors
regcache_sync() can fail while replaying cached register state during runtime resume. wm2200_runtime_resume() currently ignores that failure. Propagate the error, restore cache-only/dirty state, and unwind the LDO and core supplies acquired by runtime resume. Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn> Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20260704040044.2402-1-pengpeng@iscas.ac.cn Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
5e5ea96e68
commit
9497ea79d7
|
|
@ -2461,7 +2461,15 @@ static int wm2200_runtime_resume(struct device *dev)
|
|||
}
|
||||
|
||||
regcache_cache_only(wm2200->regmap, false);
|
||||
regcache_sync(wm2200->regmap);
|
||||
ret = regcache_sync(wm2200->regmap);
|
||||
if (ret) {
|
||||
regcache_cache_only(wm2200->regmap, true);
|
||||
regcache_mark_dirty(wm2200->regmap);
|
||||
gpiod_set_value_cansleep(wm2200->ldo_ena, 0);
|
||||
regulator_bulk_disable(ARRAY_SIZE(wm2200->core_supplies),
|
||||
wm2200->core_supplies);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user