mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
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)
This commit is contained in:
parent
972a55b62d
commit
433897f740
1 changed files with 8 additions and 5 deletions
|
@ -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_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
|
||||||
struct wm8904_pdata *pdata = wm8904->pdata;
|
struct wm8904_pdata *pdata = wm8904->pdata;
|
||||||
u16 *reg_cache = codec->reg_cache;
|
|
||||||
int ret, i;
|
int ret, i;
|
||||||
|
|
||||||
codec->cache_sync = 1;
|
codec->cache_sync = 1;
|
||||||
|
@ -2180,14 +2179,18 @@ static int wm8904_probe(struct snd_soc_codec *codec)
|
||||||
if (!pdata->gpio_cfg[i])
|
if (!pdata->gpio_cfg[i])
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
reg_cache[WM8904_GPIO_CONTROL_1 + i]
|
regmap_update_bits(wm8904->regmap,
|
||||||
= pdata->gpio_cfg[i] & 0xffff;
|
WM8904_GPIO_CONTROL_1 + i,
|
||||||
|
0xffff,
|
||||||
|
pdata->gpio_cfg[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Zero is the default value for these anyway */
|
/* Zero is the default value for these anyway */
|
||||||
for (i = 0; i < WM8904_MIC_REGS; i++)
|
for (i = 0; i < WM8904_MIC_REGS; i++)
|
||||||
reg_cache[WM8904_MIC_BIAS_CONTROL_0 + i]
|
regmap_update_bits(wm8904->regmap,
|
||||||
= pdata->mic_cfg[i];
|
WM8904_MIC_BIAS_CONTROL_0 + i,
|
||||||
|
0xffff,
|
||||||
|
pdata->mic_cfg[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set Class W by default - this will be managed by the Class
|
/* Set Class W by default - this will be managed by the Class
|
||||||
|
|
Loading…
Reference in a new issue