All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: jack: export gpio detect
@ 2014-04-03 22:03 cfreeman
  2014-04-03 22:07 ` Mark Brown
  0 siblings, 1 reply; 7+ messages in thread
From: cfreeman @ 2014-04-03 22:03 UTC (permalink / raw)
  To: alsa-devel; +Cc: broonie, lgirdwood, Christopher Freeman

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 --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)
-- 
1.8.3.2


-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH] ASoC: jack: export gpio detect
@ 2014-03-26 21:38 cfreeman
  0 siblings, 0 replies; 7+ messages in thread
From: cfreeman @ 2014-03-26 21:38 UTC (permalink / raw)
  To: alsa-devel; +Cc: Christopher Freeman

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 --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)
-- 
1.8.3.2


-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-04-14 19:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-03 22:03 [PATCH] ASoC: jack: export gpio detect cfreeman
2014-04-03 22:07 ` Mark Brown
2014-04-08 20:40   ` Christopher Freeman
2014-04-10 23:24     ` Christopher Freeman
2014-04-11 10:12       ` Mark Brown
2014-04-14 19:55     ` Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2014-03-26 21:38 cfreeman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.