ASoC: codecs: rk_codec_digital: Restore register when pm runtime_suspend/resume

Change-Id: I0730f50faa3fea1823570dd7390ac760efbfe99f
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
This commit is contained in:
Sugar Zhang 2020-11-12 09:30:12 +08:00 committed by Tao Huang
parent 271b62097e
commit ee5f3c03ef

View File

@ -602,6 +602,13 @@ static int rk_codec_digital_runtime_resume(struct device *dev)
if (ret)
return ret;
regcache_cache_only(rcd->regmap, false);
regcache_mark_dirty(rcd->regmap);
ret = regcache_sync(rcd->regmap);
if (ret)
goto err;
ret = clk_prepare_enable(rcd->clk_adc);
if (ret)
goto err;
@ -630,6 +637,7 @@ static int rk_codec_digital_runtime_suspend(struct device *dev)
{
struct rk_codec_digital_priv *rcd = dev_get_drvdata(dev);
regcache_cache_only(rcd->regmap, true);
clk_disable_unprepare(rcd->clk_adc);
clk_disable_unprepare(rcd->clk_dac);
clk_disable_unprepare(rcd->clk_i2c);