diff options
author | Charles Keepax <ckeepax@opensource.cirrus.com> | 2019-12-09 14:09:10 +0300 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2019-12-09 14:18:14 +0300 |
commit | ac7614fab9dd1054ec6bd082f02a436bb5cb082f (patch) | |
tree | 8c7aaff92e0cd4f3ffb24275a66bee038a9b946c | |
parent | be87cb72bf7513fb92fa0e9e4ae83f958c73c042 (diff) | |
download | linux-ac7614fab9dd1054ec6bd082f02a436bb5cb082f.tar.xz |
extcon: arizona: Clear jack status regardless of detection type
It makes sense to clear the internal state of the jack detection
regardless of if the headphone detect based accessory detection or
the normal microphone detect based flow is used.
No issues are currently known because of this but the change makes
more logical sense and eases future refactoring of the code.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
-rw-r--r-- | drivers/extcon/extcon-arizona.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c index 121c41706947..11f1d753aa10 100644 --- a/drivers/extcon/extcon-arizona.c +++ b/drivers/extcon/extcon-arizona.c @@ -1154,11 +1154,11 @@ static irqreturn_t arizona_jackdet(int irq, void *data) dev_err(arizona->dev, "Mechanical report failed: %d\n", ret); - if (!arizona->pdata.hpdet_acc_id) { - info->detecting = true; - info->mic = false; - info->jack_flips = 0; + info->detecting = true; + info->mic = false; + info->jack_flips = 0; + if (!arizona->pdata.hpdet_acc_id) { arizona_start_mic(info); } else { queue_delayed_work(system_power_efficient_wq, |