ASoC: rt5651: Enable sticky mode for OVCD
authorHans de Goede <hdegoede@redhat.com>
Sun, 4 Mar 2018 14:35:54 +0000 (15:35 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 7 Mar 2018 12:51:45 +0000 (12:51 +0000)
commit1b1ad83539a701a6bdcb25dc9160386e71f6016e
tree8350057fa7225afa89ed6f75fa7835533a317f1b
parente6eb0207597afa1cdd4914a17a727b101cc859ff
ASoC: rt5651: Enable sticky mode for OVCD

When the mic-gnd contacts are short-circuited by a headphones plug, the
hardware periodically retries if it can apply the bias-current leading to
the OVCD status flip-flopping 1-0-1 with it being 0 about 10% of the time.
This commit enables the sticky bit for the OVCD status to deal with this.

This commit also introduces 2 helper functions to deal with the OVCD
status bit, this may seem a bit overkill now, but these will also be
used in future patches.

Tested-by: 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