summaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-04-22 10:35:50 +0200
committerMark Brown <broonie@kernel.org>2020-04-22 14:15:57 +0200
commit5d7e0b1516dfc5901d1e394f17eb55b360e7d3d3 (patch)
treeca15eddb0399fc9d99a2adb6c08efc513ce054b2 /sound/soc
parentASoC: soc-core: return true, false in snd_soc_volsw_is_stereo() (diff)
downloadlinux-5d7e0b1516dfc5901d1e394f17eb55b360e7d3d3.tar.xz
linux-5d7e0b1516dfc5901d1e394f17eb55b360e7d3d3.zip
ASoC: dmic: Allow GPIO operations to sleep
If there is a power GPIO provided we control it from DAPM context so there is no problem with a sleeping GPIO, use the _cansleep() version of the API to allow this. Signed-off-by: Mark Brown <broonie@kernel.org> Reviewed-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200422083550.50711-1-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/dmic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/dmic.c b/sound/soc/codecs/dmic.c
index f5560a49b9e5..5d079d90fd3b 100644
--- a/sound/soc/codecs/dmic.c
+++ b/sound/soc/codecs/dmic.c
@@ -59,14 +59,14 @@ static int dmic_aif_event(struct snd_soc_dapm_widget *w,
switch (event) {
case SND_SOC_DAPM_POST_PMU:
if (dmic->gpio_en)
- gpiod_set_value(dmic->gpio_en, 1);
+ gpiod_set_value_cansleep(dmic->gpio_en, 1);
if (dmic->wakeup_delay)
msleep(dmic->wakeup_delay);
break;
case SND_SOC_DAPM_POST_PMD:
if (dmic->gpio_en)
- gpiod_set_value(dmic->gpio_en, 0);
+ gpiod_set_value_cansleep(dmic->gpio_en, 0);
break;
}