Commit 3b1228ab authored by Mark Brown's avatar Mark Brown

ASoC: Stop WM8903 SYSCLK when suspending

This will save some additional power.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent d58d5d55
...@@ -997,6 +997,9 @@ static int wm8903_set_bias_level(struct snd_soc_codec *codec, ...@@ -997,6 +997,9 @@ static int wm8903_set_bias_level(struct snd_soc_codec *codec,
case SND_SOC_BIAS_STANDBY: case SND_SOC_BIAS_STANDBY:
if (codec->bias_level == SND_SOC_BIAS_OFF) { if (codec->bias_level == SND_SOC_BIAS_OFF) {
wm8903_write(codec, WM8903_CLOCK_RATES_2,
WM8903_CLK_SYS_ENA);
wm8903_run_sequence(codec, 0); wm8903_run_sequence(codec, 0);
wm8903_sync_reg_cache(codec, codec->reg_cache); wm8903_sync_reg_cache(codec, codec->reg_cache);
...@@ -1027,6 +1030,9 @@ static int wm8903_set_bias_level(struct snd_soc_codec *codec, ...@@ -1027,6 +1030,9 @@ static int wm8903_set_bias_level(struct snd_soc_codec *codec,
case SND_SOC_BIAS_OFF: case SND_SOC_BIAS_OFF:
wm8903_run_sequence(codec, 32); wm8903_run_sequence(codec, 32);
reg = wm8903_read(codec, WM8903_CLOCK_RATES_2);
reg &= ~WM8903_CLK_SYS_ENA;
wm8903_write(codec, WM8903_CLOCK_RATES_2, reg);
break; break;
} }
...@@ -1619,9 +1625,6 @@ static int wm8903_i2c_probe(struct i2c_client *i2c, ...@@ -1619,9 +1625,6 @@ static int wm8903_i2c_probe(struct i2c_client *i2c,
wm8903_reset(codec); wm8903_reset(codec);
/* SYSCLK is required for pretty much anything */
wm8903_write(codec, WM8903_CLOCK_RATES_2, WM8903_CLK_SYS_ENA);
/* power on device */ /* power on device */
wm8903_set_bias_level(codec, SND_SOC_BIAS_STANDBY); wm8903_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment