Skip to content

Commit

Permalink
extcon: arizona: Disable debouce for accessory removal detection
Browse files Browse the repository at this point in the history
Ensure we clamp as quickly as possible after removal by disabling the
debounce while there is an accessory present.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Mark Brown committed Jan 23, 2013
1 parent 689557d commit 4e61687
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/extcon/extcon-arizona.c
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,10 @@ static irqreturn_t arizona_jackdet(int irq, void *data)
} else {
arizona_start_hpdet_acc_id(info);
}

regmap_update_bits(arizona->regmap,
ARIZONA_JACK_DETECT_DEBOUNCE,
ARIZONA_MICD_CLAMP_DB | ARIZONA_JD1_DB, 0);
} else {
dev_dbg(arizona->dev, "Detected jack removal\n");

Expand All @@ -792,6 +796,11 @@ static irqreturn_t arizona_jackdet(int irq, void *data)
if (ret != 0)
dev_err(arizona->dev, "Removal report failed: %d\n",
ret);

regmap_update_bits(arizona->regmap,
ARIZONA_JACK_DETECT_DEBOUNCE,
ARIZONA_MICD_CLAMP_DB | ARIZONA_JD1_DB,
ARIZONA_MICD_CLAMP_DB | ARIZONA_JD1_DB);
}

mutex_unlock(&info->lock);
Expand Down

0 comments on commit 4e61687

Please sign in to comment.