]> git.ipfire.org Git - thirdparty/linux.git/commit
ASoC: rt5651: Add support for jack detect using an external GPIO
authorHans de Goede <hdegoede@redhat.com>
Sat, 29 Dec 2018 23:00:21 +0000 (00:00 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 7 Jan 2019 19:23:38 +0000 (19:23 +0000)
commitc2ec9d957d2bf49d69afb1b872cb2363c6cb5862
tree477e4c4458349b4c040056a827c2c0cb8e655b22
parentd306873589c5a4c13df7176cd73d66ebfa690064
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>
sound/soc/codecs/rt5651.c
sound/soc/codecs/rt5651.h