public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] extcon: arizona: Disable debouce for accessory removal detection
@ 2013-01-23 16:03 Mark Brown
  2013-01-23 16:03 ` [PATCH 2/5] extcon: arizona: Retry failed HP measurements Mark Brown
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Mark Brown @ 2013-01-23 16:03 UTC (permalink / raw)
  To: MyungJoo Ham, Chanwoo Choi; +Cc: patches, linux-kernel, Mark Brown

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>
---
 drivers/extcon/extcon-arizona.c |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
index de141f7..ce95f86 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)
 		} 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");
 
@@ -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);
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-01-24  1:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-23 16:03 [PATCH 1/5] extcon: arizona: Disable debouce for accessory removal detection Mark Brown
2013-01-23 16:03 ` [PATCH 2/5] extcon: arizona: Retry failed HP measurements Mark Brown
2013-01-23 16:03 ` [PATCH 3/5] extcon: arizona: Remove duplicate rate configuration Mark Brown
2013-01-23 16:03 ` [PATCH 4/5] extcon: arizona: Support additional configuration of microphone detection Mark Brown
2013-01-23 16:03 ` [PATCH 5/5] extcon: arizona: Use regulated mode for microphone supply when detecting Mark Brown
2013-01-24  0:59   ` Chanwoo Choi
2013-01-24  1:10 ` [PATCH 1/5] extcon: arizona: Disable debouce for accessory removal detection Chanwoo Choi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox