linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] extcon: arizona: Fix reset of HPDET after race with removal
@ 2013-10-27 16:19 Charles Keepax
  2013-10-27 16:19 ` [PATCH 2/2] extcon: arizona: Fix race with microphone detection and removal Charles Keepax
  2013-11-04  0:32 ` [PATCH v2 1/2] extcon: arizona: Fix reset of HPDET after race with removal Chanwoo Choi
  0 siblings, 2 replies; 7+ messages in thread
From: Charles Keepax @ 2013-10-27 16:19 UTC (permalink / raw)
  To: cw00.choi; +Cc: myungjoo.ham, patches, linux-kernel, Charles Keepax

We need to make sure we reset back to our starting state, especially
making sure that we have disabled poll in the register cache.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 drivers/extcon/extcon-arizona.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
index ec9a14e..dac8ba0 100644
--- a/drivers/extcon/extcon-arizona.c
+++ b/drivers/extcon/extcon-arizona.c
@@ -596,9 +596,15 @@ static irqreturn_t arizona_hpdet_irq(int irq, void *data)
 		dev_err(arizona->dev, "Failed to report HP/line: %d\n",
 			ret);
 
+done:
+	/* Reset back to starting range */
+	regmap_update_bits(arizona->regmap,
+			   ARIZONA_HEADPHONE_DETECT_1,
+			   ARIZONA_HP_IMPEDANCE_RANGE_MASK | ARIZONA_HP_POLL,
+			   0);
+
 	arizona_extcon_do_magic(info, 0);
 
-done:
 	if (id_gpio)
 		gpio_set_value_cansleep(id_gpio, 0);
 
-- 
1.7.2.5


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

end of thread, other threads:[~2013-11-04  9:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-27 16:19 [PATCH v2 1/2] extcon: arizona: Fix reset of HPDET after race with removal Charles Keepax
2013-10-27 16:19 ` [PATCH 2/2] extcon: arizona: Fix race with microphone detection and removal Charles Keepax
2013-11-04  0:38   ` Chanwoo Choi
2013-11-04  9:11     ` Charles Keepax
2013-11-04  0:32 ` [PATCH v2 1/2] extcon: arizona: Fix reset of HPDET after race with removal Chanwoo Choi
2013-11-04  9:21   ` Charles Keepax
2013-11-04  9:41     ` Chanwoo Choi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).