diff options
author | xiangxiao <xiaoxiang@xiaomi.com> | 2014-02-23 14:44:52 +0800 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-02-24 10:27:47 +0900 |
commit | f1adf5be51a952d06760d8b38c55e209bbf7054e (patch) | |
tree | 056be40cb01df41078c7a07bad54b50f4e8c5aec /sound | |
parent | cb29d7b9ef7faf95e27d90362a5e7694c5479093 (diff) | |
download | linux-stable-f1adf5be51a952d06760d8b38c55e209bbf7054e.tar.gz linux-stable-f1adf5be51a952d06760d8b38c55e209bbf7054e.tar.bz2 linux-stable-f1adf5be51a952d06760d8b38c55e209bbf7054e.zip |
ASoC: delay the initial jack detect by debounce_time
so the hardware could get time to initialize and debounce
Signed-off-by: xiangxiao <xiaoxiang@xiaomi.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/soc-jack.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |