]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: rt5645: use polling to support HS button
authorBard Liao <bardliao@realtek.com>
Wed, 30 Dec 2015 07:33:20 +0000 (15:33 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 30 Dec 2015 16:34:54 +0000 (16:34 +0000)
commit0377fb929e71665b6edb6f74775524370e0f8d55
tree6af334526863afb3172edcf7d293812103888dd4
parent0307029b679cb8c53f0b3f2a33fd13785004492c
ASoC: rt5645: use polling to support HS button

The IRQ pin will keep high when the headset button is pressed. And
keep low when the headset button is released. So, we need irq trigger
at both edges. However, some platform can't support it. Therefore,
we polling the register to report the button release event once a
button presse event is received.
To support the headset button detection function for those can't
support both edges trigger platforms, we also need to invert the
polarity of jack detection irq since we need to keep the IRQ pin
low in normal case.

Signed-off-by: John Lin <john.lin@realtek.com>
Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt5645.c