summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-09-25 16:35:26 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-09-26 13:53:55 +0100
commitfff00cbca13ab303b3995353d22c47e6b0f68fd8 (patch)
treeecc358675b64ae2068f26e915273150ef62af274 /sound/soc
parent76dbd2af787e6ceafab9e8618a5c67e78a2de4a7 (diff)
ASoC: wm0010: Allow slow GPIO for reset
We never set the GPIO from atomic context so there's no reason why we can't support a GPIO that needs to sleep when configuring. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/wm0010.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/soc/codecs/wm0010.c b/sound/soc/codecs/wm0010.c
index f8d6c31db870..4722acfb82a8 100644
--- a/sound/soc/codecs/wm0010.c
+++ b/sound/soc/codecs/wm0010.c
@@ -168,7 +168,8 @@ static void wm0010_halt(struct snd_soc_codec *codec)
case WM0010_STAGE2:
case WM0010_FIRMWARE:
/* Remember to put chip back into reset */
- gpio_set_value(wm0010->gpio_reset, wm0010->gpio_reset_value);
+ gpio_set_value_cansleep(wm0010->gpio_reset,
+ wm0010->gpio_reset_value);
/* Disable the regulators */
regulator_disable(wm0010->dbvdd);
regulator_bulk_disable(ARRAY_SIZE(wm0010->core_supplies),
@@ -387,7 +388,7 @@ static int wm0010_boot(struct snd_soc_codec *codec)
}
/* Release reset */
- gpio_set_value(wm0010->gpio_reset, !wm0010->gpio_reset_value);
+ gpio_set_value_cansleep(wm0010->gpio_reset, !wm0010->gpio_reset_value);
spin_lock_irqsave(&wm0010->irq_lock, flags);
wm0010->state = WM0010_OUT_OF_RESET;
spin_unlock_irqrestore(&wm0010->irq_lock, flags);
@@ -918,7 +919,8 @@ static int __devexit wm0010_spi_remove(struct spi_device *spi)
if (wm0010->gpio_reset) {
/* Remember to put chip back into reset */
- gpio_set_value(wm0010->gpio_reset, wm0010->gpio_reset_value);
+ gpio_set_value_cansleep(wm0010->gpio_reset,
+ wm0010->gpio_reset_value);
}
if (wm0010->irq)