summaryrefslogtreecommitdiff
path: root/sound/soc/codecs
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-02-06 18:42:14 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-02-06 19:06:18 +0000
commit27060b3c64a1b9bc0b60c27da6153cf78919fa72 (patch)
tree1fb4a555be479d1b4d052248aea406bdc11c2f05 /sound/soc/codecs
parent5fab517476ad1e4af0043a7b8dd0bd4cdc58df9d (diff)
ASoC: wm8994: Unsuspend the device while reading GPIO statuses
Otherwise we might get an error if the GPIO is configured as an input since that makes the register volatile and a suspended device can't be read from. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r--sound/soc/codecs/wm8994.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 6b12f5da6b7f..6a47c75119bd 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -3539,6 +3539,9 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec)
wm8994->fll_locked_irq = false;
}
+ /* Make sure we can read from the GPIOs if they're inputs */
+ pm_runtime_get_sync(codec->dev);
+
/* Remember if AIFnLRCLK is configured as a GPIO. This should be
* configured on init - if a system wants to do this dynamically
* at runtime we can deal with that then.
@@ -3567,6 +3570,8 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec)
wm8994->lrclk_shared[1] = 0;
}
+ pm_runtime_put(codec->dev);
+
/* Latch volume updates (right only; we always do left then right). */
snd_soc_update_bits(codec, WM8994_AIF1_DAC1_LEFT_VOLUME,
WM8994_AIF1DAC1_VU, WM8994_AIF1DAC1_VU);