Skip to contentSkip to conversation

ASoC: delay the initial jack detect by debounce_time

PATCH Applied xiangxiao 2 participants 2 messages Feb 23, 2014 – Feb 24, 2014

Subsystems (2)
lore
Share & tools
lore

xiangxiao

author
#0 lore raw

PATCH 1/1 ASoC: delay the initial jack detect by debounce_time

so the hardware could get time to initialize and debounce

Change-Id Iebeffa9bac6c4012ee8f9645771c13b28fe5ae80
---
 sound/soc/soc-jack.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
sound/soc/soc-jack.c +2 -1
index 23d43da..b12fce6 100644
@@ -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;
Signature · 1 line
1.8.1.2
maintainer Applied
#1 lore raw
Quoted 1 line · xiangxiao

so the hardware could get time to initialize and debounce

Applied, thanks.