summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/rt5651.h
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2018-12-30 00:00:21 +0100
committerMark Brown <broonie@kernel.org>2019-01-07 19:23:38 +0000
commitc2ec9d957d2bf49d69afb1b872cb2363c6cb5862 (patch)
tree477e4c4458349b4c040056a827c2c0cb8e655b22 /sound/soc/codecs/rt5651.h
parentd306873589c5a4c13df7176cd73d66ebfa690064 (diff)
downloadlinux-c2ec9d957d2bf49d69afb1b872cb2363c6cb5862.tar.bz2
ASoC: rt5651: Add support for jack detect using an external GPIO
Some board designs hook the jack-detect up to an external GPIO, rather then to one of the codec pins, add support for this. Figuring out which GPIO to use is pretty much board specific so I've chosen to let the machine driver pass the gpio_desc as data argument to snd_soc_component_set_jack() rather then add support for getting the GPIO to the codec driver. This keeps the codec code nice and clean. Note that using an external GPIO for this conflicts with button-press support, so this commit disables button-press support when an external GPIO is used. Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt5651.h')
-rw-r--r--sound/soc/codecs/rt5651.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/codecs/rt5651.h b/sound/soc/codecs/rt5651.h
index ac6de6fb5414..41fcb8b5eb40 100644
--- a/sound/soc/codecs/rt5651.h
+++ b/sound/soc/codecs/rt5651.h
@@ -2073,6 +2073,7 @@ struct rt5651_priv {
struct regmap *regmap;
/* Jack and button detect data */
struct snd_soc_jack *hp_jack;
+ struct gpio_desc *gpiod_hp_det;
struct work_struct jack_detect_work;
struct delayed_work bp_work;
bool ovcd_irq_enabled;