diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2015-08-05 17:06:04 +0200 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2015-08-05 17:27:11 +0200 |
commit | e1c37ca80325d8e3005b259a0eccb2f19abcc94a (patch) | |
tree | 6e6f6d29eb89382144a32e2326c462a0c2473569 /sound/soc/fsl | |
parent | e5a411c2f2e3b62a4b6c962b42a7f148e3eadec1 (diff) |
ASoC: fsl_sai_ac97: restore register contents for LPSTOP modes
Lowest power modes loose the content of the registers. Use regmap
cache to restore the register entries on resume from lowest power
modes.
Diffstat (limited to 'sound/soc/fsl')
-rw-r--r-- | sound/soc/fsl/fsl_sai_ac97.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/fsl/fsl_sai_ac97.c b/sound/soc/fsl/fsl_sai_ac97.c index 921d7cb094d3..68bd61df2864 100644 --- a/sound/soc/fsl/fsl_sai_ac97.c +++ b/sound/soc/fsl/fsl_sai_ac97.c @@ -577,6 +577,7 @@ static struct regmap_config fsl_sai_regmap_config = { .readable_reg = fsl_sai_readable_reg, .volatile_reg = fsl_sai_volatile_reg, .writeable_reg = fsl_sai_writeable_reg, + .cache_type = REGCACHE_RBTREE, }; static struct snd_pcm_hardware snd_sai_ac97_hardware = { @@ -1239,6 +1240,8 @@ static int fsl_sai_ac97_suspend(struct device *dev) dmaengine_terminate_all(sai->dma_tx_chan); dmaengine_terminate_all(sai->dma_rx_chan); + regcache_cache_only(sai->regmap, true); + return 0; } @@ -1246,6 +1249,10 @@ static int fsl_sai_ac97_resume(struct device *dev) { struct fsl_sai_ac97 *sai = dev_get_drvdata(dev); + regcache_mark_dirty(sai->regmap); + regcache_cache_only(sai->regmap, false); + regcache_sync(sai->regmap); + /* Reset SAI */ fsl_sai_ac97_reset_sai(sai); |