summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-03-13 14:19:32 +0000
committerMark Brown <broonie@linaro.org>2014-03-13 14:19:32 +0000
commit4c11a761b8cff3d1941a53ec2a2bb2279ca38b44 (patch)
treed321b527b61727afbcf606766a529dc6a36aa7b8
parent2620954d64f6f067b785faf03738b637f3473ca7 (diff)
parentf1adf5be51a952d06760d8b38c55e209bbf7054e (diff)
downloadop-kernel-dev-4c11a761b8cff3d1941a53ec2a2bb2279ca38b44.zip
op-kernel-dev-4c11a761b8cff3d1941a53ec2a2bb2279ca38b44.tar.gz
Merge remote-tracking branch 'asoc/topic/jack' into asoc-next
-rw-r--r--include/sound/soc.h3
-rw-r--r--sound/soc/soc-jack.c5
2 files changed, 5 insertions, 3 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 59b2a6a..f7de629 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -607,7 +607,8 @@ struct snd_soc_jack_gpio {
struct snd_soc_jack *jack;
struct delayed_work work;
- int (*jack_status_check)(void);
+ void *data;
+ int (*jack_status_check)(void *data);
};
struct snd_soc_jack {
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c
index 23d43da..b903f82 100644
--- a/sound/soc/soc-jack.c
+++ b/sound/soc/soc-jack.c
@@ -250,7 +250,7 @@ static void snd_soc_jack_gpio_detect(struct snd_soc_jack_gpio *gpio)
report = 0;
if (gpio->jack_status_check)
- report = gpio->jack_status_check();
+ report = gpio->jack_status_check(gpio->data);
snd_soc_jack_report(jack, report, gpio->report);
}
@@ -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;
OpenPOWER on IntegriCloud