diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-06-09 11:38:12 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-06-22 11:37:14 -0700 |
commit | 064cd01904b2796438079f50f91b3b7fc90bf559 (patch) | |
tree | 294d2b91f5fc45feb356061c9a4518b0082c80e3 /sound/soc/codecs | |
parent | bc9b784a0be41c0966817b6f53e589f73c82392b (diff) | |
download | linux-3.10-064cd01904b2796438079f50f91b3b7fc90bf559.tar.gz linux-3.10-064cd01904b2796438079f50f91b3b7fc90bf559.tar.bz2 linux-3.10-064cd01904b2796438079f50f91b3b7fc90bf559.zip |
ASoC: wm8904: Fix GPIO and MICBIAS initialisation for regmap conversion
commit 433897f7408b556f7dfbb98c94deea02e634d2a7 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/soc/codecs')
-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 65d525d74c5..4e190b5950b 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) { struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec); struct wm8904_pdata *pdata = wm8904->pdata; - u16 *reg_cache = codec->reg_cache; int ret, i; codec->cache_sync = 1; @@ -2180,14 +2179,18 @@ static int wm8904_probe(struct snd_soc_codec *codec) if (!pdata->gpio_cfg[i]) continue; - reg_cache[WM8904_GPIO_CONTROL_1 + i] - = pdata->gpio_cfg[i] & 0xffff; + regmap_update_bits(wm8904->regmap, + WM8904_GPIO_CONTROL_1 + i, + 0xffff, + pdata->gpio_cfg[i]); } /* Zero is the default value for these anyway */ for (i = 0; i < WM8904_MIC_REGS; i++) - reg_cache[WM8904_MIC_BIAS_CONTROL_0 + i] - = pdata->mic_cfg[i]; + regmap_update_bits(wm8904->regmap, + WM8904_MIC_BIAS_CONTROL_0 + i, + 0xffff, + pdata->mic_cfg[i]); } /* Set Class W by default - this will be managed by the Class |