Skip to content

Commit

Permalink
extcon: arizona: Clear jack status regardless of detection type
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Chanwoo Choi <[email protected]>
  • Loading branch information
charleskeepax authored and chanwoochoi committed Dec 9, 2019
1 parent be87cb7 commit ac7614f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/extcon/extcon-arizona.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ac7614f

Please sign in to comment.