mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user