OSDN Git Service

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)
commit7ff6319e7da5c09f0ce86d122d46040807262325
tree6af334526863afb3172edcf7d293812103888dd4
parent9761c0f65d3a4c7ae8ceec86ac9d8d2c64197d57
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