]> git.baikalelectronics.ru Git - kernel.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)
commit5512fd2054e59119e096398061f237d88e032ad9
tree477e4c4458349b4c040056a827c2c0cb8e655b22
parent33be0c28d4a418f25831bf6764f6e45d1f1425df
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