ASoC: rt5651: Allow disabling jack-detect by calling set_jack(NULL)
authorHans de Goede <hdegoede@redhat.com>
Wed, 4 Jul 2018 22:59:32 +0000 (00:59 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 10 Jul 2018 17:49:25 +0000 (18:49 +0100)
commit34c906ddacd237511808fb2bbd941e6b91e9095a
tree04267763e0371b3197e116d8ed07dd4f9b530c51
parent8d2d7bcdc1645dc243f7735278675b083c0e506c
ASoC: rt5651: Allow disabling jack-detect by calling set_jack(NULL)

Allow the machine driver to disable jack-detect over a suspend/resume by
calling snd_soc_component_set_jack(NULL).

Note this renames rt5651_set_jack, where all the jack-enable work was done
to rt5651_enable_jack_detect. This function can now no longer fail as it
does not request the IRQ anymore. It can still be passed an invalid jack
source, but that should never happen, so this is now logged and treated as
no jack source.

Cc: Carlo Caione <carlo@endlessm.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt5651.c