ASoC: max98090: fix interrupt handling problem
authorDongwoo Lee <dwoo08.lee@samsung.com>
Fri, 21 Oct 2016 07:51:40 +0000 (16:51 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 14 Dec 2016 04:54:35 +0000 (13:54 +0900)
commit287de690cbe05fa894e510b9482f47943227f259
tree465ec3007942aee541ae8e0c1a55fc7ff9a4c8a2
parent141d04287de37ac7f6827577db839bf7f34f0ec1
ASoC: max98090: fix interrupt handling problem

The max98090_interrupt handler currently will read the device status
register. After that, it will act only when the JDET bit is set.
However, when max98090_interrupt handler is triggered and jack status
register has really changed, the JDET bit of device status register
is not set as expected for unknown reason. Because of this, the jack status cannot be reported.

This patch adds a workaround solution for jack detection, by adding
the second chance to recognize the reason of interrupt generation.
If the interrupt is generated without setting any values on device
status register, jack status register is compared to the current jack
states. If the jack status is changed, the JDET bit is manually set.

Change-Id: I74f6fb54fb9cc47e292f1f8e116032faae89c063
Reported-by: Huang Chao <chao7.huang@samsung.com>
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
sound/soc/codecs/max98090.c