diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-02-10 08:32:58 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-02-11 06:13:48 -0500 |
commit | 66daaa59d5f0310238de183918e13062428fb59f (patch) | |
tree | d832992a9eda775d93079d5d8b5ecfae54cd20f2 /sound/soc/codecs/wm8903.c | |
parent | c5b6a9feaeb0fa0e39e3fc10f9bf8cc8de498739 (diff) |
ASoC: Convert WM8903 bias management to use snd_soc_update_bits()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound/soc/codecs/wm8903.c')
-rw-r--r-- | sound/soc/codecs/wm8903.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c index 2f912276a8f5..b88c6165dd25 100644 --- a/sound/soc/codecs/wm8903.c +++ b/sound/soc/codecs/wm8903.c | |||
@@ -1139,15 +1139,13 @@ static int wm8903_add_widgets(struct snd_soc_codec *codec) | |||
1139 | static int wm8903_set_bias_level(struct snd_soc_codec *codec, | 1139 | static int wm8903_set_bias_level(struct snd_soc_codec *codec, |
1140 | enum snd_soc_bias_level level) | 1140 | enum snd_soc_bias_level level) |
1141 | { | 1141 | { |
1142 | u16 reg; | ||
1143 | |||
1144 | switch (level) { | 1142 | switch (level) { |
1145 | case SND_SOC_BIAS_ON: | 1143 | case SND_SOC_BIAS_ON: |
1144 | break; | ||
1146 | case SND_SOC_BIAS_PREPARE: | 1145 | case SND_SOC_BIAS_PREPARE: |
1147 | reg = snd_soc_read(codec, WM8903_VMID_CONTROL_0); | 1146 | snd_soc_update_bits(codec, WM8903_VMID_CONTROL_0, |
1148 | reg &= ~(WM8903_VMID_RES_MASK); | 1147 | WM8903_VMID_RES_MASK, |
1149 | reg |= WM8903_VMID_RES_50K; | 1148 | WM8903_VMID_RES_50K); |
1150 | snd_soc_write(codec, WM8903_VMID_CONTROL_0, reg); | ||
1151 | break; | 1149 | break; |
1152 | 1150 | ||
1153 | case SND_SOC_BIAS_STANDBY: | 1151 | case SND_SOC_BIAS_STANDBY: |
@@ -1174,10 +1172,9 @@ static int wm8903_set_bias_level(struct snd_soc_codec *codec, | |||
1174 | WM8903_CP_DYN_V); | 1172 | WM8903_CP_DYN_V); |
1175 | } | 1173 | } |
1176 | 1174 | ||
1177 | reg = snd_soc_read(codec, WM8903_VMID_CONTROL_0); | 1175 | snd_soc_update_bits(codec, WM8903_VMID_CONTROL_0, |
1178 | reg &= ~(WM8903_VMID_RES_MASK); | 1176 | WM8903_VMID_RES_MASK, |
1179 | reg |= WM8903_VMID_RES_250K; | 1177 | WM8903_VMID_RES_250K); |
1180 | snd_soc_write(codec, WM8903_VMID_CONTROL_0, reg); | ||
1181 | break; | 1178 | break; |
1182 | 1179 | ||
1183 | case SND_SOC_BIAS_OFF: | 1180 | case SND_SOC_BIAS_OFF: |