From: xiangxiao Date: Sun, 23 Feb 2014 06:44:52 +0000 (+0800) Subject: ASoC: delay the initial jack detect by debounce_time X-Git-Tag: next-20140306~53^2~5^4 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f1adf5be51a952d06760d8b38c55e209bbf7054e;p=karo-tx-linux.git ASoC: delay the initial jack detect by debounce_time so the hardware could get time to initialize and debounce Signed-off-by: xiangxiao Signed-off-by: Mark Brown --- diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c index 720060286d19..b903f822d1b2 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;