diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-08-14 22:01:02 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-08-15 10:54:12 -0400 |
commit | d09f3ecf1a7ba658934fa3c45f67ed2620a50950 (patch) | |
tree | e858a45b954655172f48596598f574754a6914e3 /sound/soc/codecs/wm8994.c | |
parent | 5c58b739c3a1cc41a80991c37b17e181dd1bb51d (diff) |
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: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8994.c')
-rw-r--r-- | sound/soc/codecs/wm8994.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index e5691ad8a2d3..0f36eeeb5fae 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
@@ -2459,6 +2459,21 @@ static int wm8994_set_tristate(struct snd_soc_dai *codec_dai, int tristate) | |||
2459 | return snd_soc_update_bits(codec, reg, mask, val); | 2459 | return snd_soc_update_bits(codec, reg, mask, val); |
2460 | } | 2460 | } |
2461 | 2461 | ||
2462 | static int wm8994_aif2_probe(struct snd_soc_dai *dai) | ||
2463 | { | ||
2464 | struct snd_soc_codec *codec = dai->codec; | ||
2465 | |||
2466 | /* Disable the pulls on the AIF if we're using it to save power. */ | ||
2467 | snd_soc_update_bits(codec, WM8994_GPIO_3, | ||
2468 | WM8994_GPN_PU | WM8994_GPN_PD, 0); | ||
2469 | snd_soc_update_bits(codec, WM8994_GPIO_4, | ||
2470 | WM8994_GPN_PU | WM8994_GPN_PD, 0); | ||
2471 | snd_soc_update_bits(codec, WM8994_GPIO_5, | ||
2472 | WM8994_GPN_PU | WM8994_GPN_PD, 0); | ||
2473 | |||
2474 | return 0; | ||
2475 | } | ||
2476 | |||
2462 | #define WM8994_RATES SNDRV_PCM_RATE_8000_96000 | 2477 | #define WM8994_RATES SNDRV_PCM_RATE_8000_96000 |
2463 | 2478 | ||
2464 | #define WM8994_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ | 2479 | #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 | .rates = WM8994_RATES, | 2541 | .rates = WM8994_RATES, |
2527 | .formats = WM8994_FORMATS, | 2542 | .formats = WM8994_FORMATS, |
2528 | }, | 2543 | }, |
2544 | .probe = wm8994_aif2_probe, | ||
2529 | .ops = &wm8994_aif2_dai_ops, | 2545 | .ops = &wm8994_aif2_dai_ops, |
2530 | }, | 2546 | }, |
2531 | { | 2547 | { |