diff mbox

ASoC: delay the initial jack detect by debounce_time

Message ID 1393137892-21007-1-git-send-email-xiaoxiang@xiaomi.com (mailing list archive)
State Accepted
Commit f1adf5be51a952d06760d8b38c55e209bbf7054e
Headers show

Commit Message

Xiang Xiao Feb. 23, 2014, 6:44 a.m. UTC
so the hardware could get time to initialize and debounce

Change-Id: Iebeffa9bac6c4012ee8f9645771c13b28fe5ae80
Signed-off-by: xiangxiao <xiaoxiang@xiaomi.com>
---
 sound/soc/soc-jack.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Mark Brown Feb. 24, 2014, 1:28 a.m. UTC | #1
On Sun, Feb 23, 2014 at 02:44:52PM +0800, xiangxiao wrote:
> so the hardware could get time to initialize and debounce

Applied, thanks.
diff mbox

Patch

diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c
index 23d43da..b12fce6 100644
--- a/sound/soc/soc-jack.c
+++ b/sound/soc/soc-jack.c
@@ -342,7 +342,8 @@  int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count,
 		gpio_export(gpios[i].gpio, false);
 
 		/* Update initial jack status */
-		snd_soc_jack_gpio_detect(&gpios[i]);
+		schedule_delayed_work(&gpios[i].work,
+				      msecs_to_jiffies(gpios[i].debounce_time));
 	}
 
 	return 0;