Commit d09f3ecf authored by Mark Brown's avatar Mark Brown

ASoC: Disable pulls on WM8994 AIF2 when starting it

Pull control is availalbe for WM8994 AIF2, generally disabled as part of
the GPIO configuration in order to save power after system startup. As on
newer devices in the series there is no GPIO functionality on these pins
this will happen less naturally so have the driver disable the pulls as the
AIF is probed.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 5c58b739
...@@ -2459,6 +2459,21 @@ static int wm8994_set_tristate(struct snd_soc_dai *codec_dai, int tristate) ...@@ -2459,6 +2459,21 @@ static int wm8994_set_tristate(struct snd_soc_dai *codec_dai, int tristate)
return snd_soc_update_bits(codec, reg, mask, val); return snd_soc_update_bits(codec, reg, mask, val);
} }
static int wm8994_aif2_probe(struct snd_soc_dai *dai)
{
struct snd_soc_codec *codec = dai->codec;
/* Disable the pulls on the AIF if we're using it to save power. */
snd_soc_update_bits(codec, WM8994_GPIO_3,
WM8994_GPN_PU | WM8994_GPN_PD, 0);
snd_soc_update_bits(codec, WM8994_GPIO_4,
WM8994_GPN_PU | WM8994_GPN_PD, 0);
snd_soc_update_bits(codec, WM8994_GPIO_5,
WM8994_GPN_PU | WM8994_GPN_PD, 0);
return 0;
}
#define WM8994_RATES SNDRV_PCM_RATE_8000_96000 #define WM8994_RATES SNDRV_PCM_RATE_8000_96000
#define WM8994_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ #define WM8994_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\
...@@ -2526,6 +2541,7 @@ static struct snd_soc_dai_driver wm8994_dai[] = { ...@@ -2526,6 +2541,7 @@ static struct snd_soc_dai_driver wm8994_dai[] = {
.rates = WM8994_RATES, .rates = WM8994_RATES,
.formats = WM8994_FORMATS, .formats = WM8994_FORMATS,
}, },
.probe = wm8994_aif2_probe,
.ops = &wm8994_aif2_dai_ops, .ops = &wm8994_aif2_dai_ops,
}, },
{ {
......
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