Export the snd_soc_jack_gpio_detect function. Allow it to be called to
poll a gpio jack during resume, checking for state changes that may have
been missed while sleeping.
BUG=chrome-os-partner:14417
TEST=Plug headphones, play audio, suspend, unplug, resume, check audio
comes from speakers.
Change-Id: I3c2abf1c69abca6178bde1391b323efa0a6c507d
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/34047
Reviewed-by: Olof Johansson <olofj@chromium.org>
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 */
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)
+/**
+ * snd_soc_jack_gpio_detect - Check the vlaue of the gpio and report jack state.
+ *
+ * @gpio: gpio pin to check.
+ *
+ * This function will poll the state of the gpio and report on the jack.
+ */
+void snd_soc_jack_gpio_detect(struct snd_soc_jack_gpio *gpio)
{
struct snd_soc_jack *jack = gpio->jack;
int enable;
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)