aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorDylan Reid <dgreid@chromium.org>2014-02-12 13:24:54 -0500
committerMark Brown <broonie@linaro.org>2014-02-12 14:55:31 -0500
commitc42c8922c46d33ed769e99618bdfba06866a0c72 (patch)
tree2ffeac9f74b26b9aba81ac51f329498e7f50e327 /sound
parent38dbfb59d1175ef458d006556061adeaa8751b72 (diff)
ASoC: max98090: sync regcache on entering STANDBY
Sync regcache when entering STANDBY from OFF. ON isn't entered with OFF as the current state, so the registers were not being re-synced after suspend/resume. The 98088 and 98095 already call regcache_sync from STANDBY. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/max98090.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
index 51f9b3d16b41..149b57f6334b 100644
--- a/sound/soc/codecs/max98090.c
+++ b/sound/soc/codecs/max98090.c
@@ -1769,16 +1769,6 @@ static int max98090_set_bias_level(struct snd_soc_codec *codec,
1769 1769
1770 switch (level) { 1770 switch (level) {
1771 case SND_SOC_BIAS_ON: 1771 case SND_SOC_BIAS_ON:
1772 if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) {
1773 ret = regcache_sync(max98090->regmap);
1774
1775 if (ret != 0) {
1776 dev_err(codec->dev,
1777 "Failed to sync cache: %d\n", ret);
1778 return ret;
1779 }
1780 }
1781
1782 if (max98090->jack_state == M98090_JACK_STATE_HEADSET) { 1772 if (max98090->jack_state == M98090_JACK_STATE_HEADSET) {
1783 /* 1773 /*
1784 * Set to normal bias level. 1774 * Set to normal bias level.
@@ -1792,6 +1782,16 @@ static int max98090_set_bias_level(struct snd_soc_codec *codec,
1792 break; 1782 break;
1793 1783
1794 case SND_SOC_BIAS_STANDBY: 1784 case SND_SOC_BIAS_STANDBY:
1785 if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) {
1786 ret = regcache_sync(max98090->regmap);
1787 if (ret != 0) {
1788 dev_err(codec->dev,
1789 "Failed to sync cache: %d\n", ret);
1790 return ret;
1791 }
1792 }
1793 break;
1794
1795 case SND_SOC_BIAS_OFF: 1795 case SND_SOC_BIAS_OFF:
1796 /* Set internal pull-up to lowest power mode */ 1796 /* Set internal pull-up to lowest power mode */
1797 snd_soc_update_bits(codec, M98090_REG_JACK_DETECT, 1797 snd_soc_update_bits(codec, M98090_REG_JACK_DETECT,