diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-09-25 11:35:26 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-09-26 08:53:55 -0400 |
commit | fff00cbca13ab303b3995353d22c47e6b0f68fd8 (patch) | |
tree | ecc358675b64ae2068f26e915273150ef62af274 /sound/soc | |
parent | 76dbd2af787e6ceafab9e8618a5c67e78a2de4a7 (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.c | 8 |
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) | |||
168 | case WM0010_STAGE2: | 168 | case WM0010_STAGE2: |
169 | case WM0010_FIRMWARE: | 169 | case WM0010_FIRMWARE: |
170 | /* Remember to put chip back into reset */ | 170 | /* Remember to put chip back into reset */ |
171 | gpio_set_value(wm0010->gpio_reset, wm0010->gpio_reset_value); | 171 | gpio_set_value_cansleep(wm0010->gpio_reset, |
172 | wm0010->gpio_reset_value); | ||
172 | /* Disable the regulators */ | 173 | /* Disable the regulators */ |
173 | regulator_disable(wm0010->dbvdd); | 174 | regulator_disable(wm0010->dbvdd); |
174 | regulator_bulk_disable(ARRAY_SIZE(wm0010->core_supplies), | 175 | regulator_bulk_disable(ARRAY_SIZE(wm0010->core_supplies), |
@@ -387,7 +388,7 @@ static int wm0010_boot(struct snd_soc_codec *codec) | |||
387 | } | 388 | } |
388 | 389 | ||
389 | /* Release reset */ | 390 | /* Release reset */ |
390 | gpio_set_value(wm0010->gpio_reset, !wm0010->gpio_reset_value); | 391 | gpio_set_value_cansleep(wm0010->gpio_reset, !wm0010->gpio_reset_value); |
391 | spin_lock_irqsave(&wm0010->irq_lock, flags); | 392 | spin_lock_irqsave(&wm0010->irq_lock, flags); |
392 | wm0010->state = WM0010_OUT_OF_RESET; | 393 | wm0010->state = WM0010_OUT_OF_RESET; |
393 | spin_unlock_irqrestore(&wm0010->irq_lock, flags); | 394 | spin_unlock_irqrestore(&wm0010->irq_lock, flags); |
@@ -918,7 +919,8 @@ static int __devexit wm0010_spi_remove(struct spi_device *spi) | |||
918 | 919 | ||
919 | if (wm0010->gpio_reset) { | 920 | if (wm0010->gpio_reset) { |
920 | /* Remember to put chip back into reset */ | 921 | /* Remember to put chip back into reset */ |
921 | gpio_set_value(wm0010->gpio_reset, wm0010->gpio_reset_value); | 922 | gpio_set_value_cansleep(wm0010->gpio_reset, |
923 | wm0010->gpio_reset_value); | ||
922 | } | 924 | } |
923 | 925 | ||
924 | if (wm0010->irq) | 926 | if (wm0010->irq) |