ASoC: delay the initial jack detect by debounce_time
authorxiangxiao <xiaoxiang@xiaomi.com>
Sun, 23 Feb 2014 06:44:52 +0000 (14:44 +0800)
committerMark Brown <broonie@linaro.org>
Mon, 24 Feb 2014 01:27:47 +0000 (10:27 +0900)
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>
sound/soc/soc-jack.c

index 720060286d199f29b2749b964c32d17a9584a34a..b903f822d1b2069062cae422d4a3a5f96f3ca342 100644 (file)
@@ -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;
This page took 0.025271 seconds and 5 git commands to generate.