diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-06-08 23:38:12 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-06-11 01:11:40 -0400 |
commit | 433897f7408b556f7dfbb98c94deea02e634d2a7 (patch) | |
tree | 87908c83733c7f3ca300c0e17cb4bb0f6361c569 /sound/soc/codecs/wm8904.c | |
parent | 972a55b62d592cfcd6d73577df8a52f1251ea9a7 (diff) |
ASoC: wm8904: Fix GPIO and MICBIAS initialisation for regmap conversion
We no longer have a flat ASoC cache so can't peer directly into the array
any more but should instead use the register I/O functions to update the
cache.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org (v3.4)
Diffstat (limited to 'sound/soc/codecs/wm8904.c')
-rw-r--r-- | sound/soc/codecs/wm8904.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c index 65d525d74c54..4e190b5950ba 100644 --- a/sound/soc/codecs/wm8904.c +++ b/sound/soc/codecs/wm8904.c | |||
@@ -2084,7 +2084,6 @@ static int wm8904_probe(struct snd_soc_codec *codec) | |||
2084 | { | 2084 | { |
2085 | struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec); | 2085 | struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec); |
2086 | struct wm8904_pdata *pdata = wm8904->pdata; | 2086 | struct wm8904_pdata *pdata = wm8904->pdata; |
2087 | u16 *reg_cache = codec->reg_cache; | ||
2088 | int ret, i; | 2087 | int ret, i; |
2089 | 2088 | ||
2090 | codec->cache_sync = 1; | 2089 | codec->cache_sync = 1; |
@@ -2180,14 +2179,18 @@ static int wm8904_probe(struct snd_soc_codec *codec) | |||
2180 | if (!pdata->gpio_cfg[i]) | 2179 | if (!pdata->gpio_cfg[i]) |
2181 | continue; | 2180 | continue; |
2182 | 2181 | ||
2183 | reg_cache[WM8904_GPIO_CONTROL_1 + i] | 2182 | regmap_update_bits(wm8904->regmap, |
2184 | = pdata->gpio_cfg[i] & 0xffff; | 2183 | WM8904_GPIO_CONTROL_1 + i, |
2184 | 0xffff, | ||
2185 | pdata->gpio_cfg[i]); | ||
2185 | } | 2186 | } |
2186 | 2187 | ||
2187 | /* Zero is the default value for these anyway */ | 2188 | /* Zero is the default value for these anyway */ |
2188 | for (i = 0; i < WM8904_MIC_REGS; i++) | 2189 | for (i = 0; i < WM8904_MIC_REGS; i++) |
2189 | reg_cache[WM8904_MIC_BIAS_CONTROL_0 + i] | 2190 | regmap_update_bits(wm8904->regmap, |
2190 | = pdata->mic_cfg[i]; | 2191 | WM8904_MIC_BIAS_CONTROL_0 + i, |
2192 | 0xffff, | ||
2193 | pdata->mic_cfg[i]); | ||
2191 | } | 2194 | } |
2192 | 2195 | ||
2193 | /* Set Class W by default - this will be managed by the Class | 2196 | /* Set Class W by default - this will be managed by the Class |