aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/extcon
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2013-01-15 08:09:20 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-01-22 20:31:49 -0500
commit4e6168779508f62c27e43a4f7ded786bfdb0a394 (patch)
tree7370497278d47295477c344398357c2a226bd82d /drivers/extcon
parent689557d3c7045320958d5bc4141088f7b4dff7ba (diff)
extcon: arizona: Disable debouce for accessory removal detection
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>
Diffstat (limited to 'drivers/extcon')
-rw-r--r--drivers/extcon/extcon-arizona.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
index de141f72c8e5..ce95f8625e8d 100644
--- a/drivers/extcon/extcon-arizona.c
+++ b/drivers/extcon/extcon-arizona.c
@@ -773,6 +773,10 @@ static irqreturn_t arizona_jackdet(int irq, void *data)
773 } else { 773 } else {
774 arizona_start_hpdet_acc_id(info); 774 arizona_start_hpdet_acc_id(info);
775 } 775 }
776
777 regmap_update_bits(arizona->regmap,
778 ARIZONA_JACK_DETECT_DEBOUNCE,
779 ARIZONA_MICD_CLAMP_DB | ARIZONA_JD1_DB, 0);
776 } else { 780 } else {
777 dev_dbg(arizona->dev, "Detected jack removal\n"); 781 dev_dbg(arizona->dev, "Detected jack removal\n");
778 782
@@ -792,6 +796,11 @@ static irqreturn_t arizona_jackdet(int irq, void *data)
792 if (ret != 0) 796 if (ret != 0)
793 dev_err(arizona->dev, "Removal report failed: %d\n", 797 dev_err(arizona->dev, "Removal report failed: %d\n",
794 ret); 798 ret);
799
800 regmap_update_bits(arizona->regmap,
801 ARIZONA_JACK_DETECT_DEBOUNCE,
802 ARIZONA_MICD_CLAMP_DB | ARIZONA_JD1_DB,
803 ARIZONA_MICD_CLAMP_DB | ARIZONA_JD1_DB);
795 } 804 }
796 805
797 mutex_unlock(&info->lock); 806 mutex_unlock(&info->lock);