diff mbox

ASoC: jack: export gpio detect

Message ID 1395869924-32195-1-git-send-email-cfreeman@nvidia.com (mailing list archive)
State New, archived
Headers show

Commit Message

Christopher Freeman March 26, 2014, 9:38 p.m. UTC
From: Christopher Freeman <cfreeman@nvidia.com>

Export the gpio detect function so machine drivers
may call it.  Interrupts for the jack may be disabled
during sleep, so this allows a machine driver to have
the jack status updated during resume.

Signed-off-by: Christopher Freeman <cfreeman@nvidia.com>
---
 include/sound/soc.h  | 1 +
 sound/soc/soc-jack.c | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/include/sound/soc.h b/include/sound/soc.h
index a6a059c..36383cb 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -442,6 +442,7 @@  int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count,
 			struct snd_soc_jack_gpio *gpios);
 void snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count,
 			struct snd_soc_jack_gpio *gpios);
+void snd_soc_jack_gpio_detect(struct snd_soc_jack_gpio *gpio);
 #endif
 
 /* codec register bit access */
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c
index 0bb5ccc..fd97cc5 100644
--- a/sound/soc/soc-jack.c
+++ b/sound/soc/soc-jack.c
@@ -231,7 +231,7 @@  EXPORT_SYMBOL_GPL(snd_soc_jack_notifier_unregister);
 
 #ifdef CONFIG_GPIOLIB
 /* gpio detect */
-static void snd_soc_jack_gpio_detect(struct snd_soc_jack_gpio *gpio)
+void snd_soc_jack_gpio_detect(struct snd_soc_jack_gpio *gpio)
 {
 	struct snd_soc_jack *jack = gpio->jack;
 	int enable;
@@ -251,6 +251,7 @@  static void snd_soc_jack_gpio_detect(struct snd_soc_jack_gpio *gpio)
 
 	snd_soc_jack_report(jack, report, gpio->report);
 }
+EXPORT_SYMBOL_GPL(snd_soc_jack_gpio_detect);
 
 /* irq handler for gpio pin */
 static irqreturn_t gpio_handler(int irq, void *data)