Skip to content

Commit

Permalink
ASoC: delay the initial jack detect by debounce_time
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
xiangxiao authored and Mark Brown committed Feb 24, 2014
1 parent cb29d7b commit f1adf5b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sound/soc/soc-jack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f1adf5b

Please sign in to comment.