Skip to contentSkip to conversation

extcon: arizona: Clear trig_sts bits on all paths

PATCH In review Charles Keepax 2 participants 2 messages Aug 7, 2013 – Aug 13, 2013 External connector subsystem (extcon)

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 extcon: arizona: Clear trig_sts bits on all paths

We want the trig_sts bits to be cleared in all cases where we consider the jack detection interrupt to have been handled. Specifically, if a duplicate detection event was suppressed these bits were not cleared causing the CODEC to not enter a low power state. This patch clears the bits on the duplicate detection code path.

---
 drivers/extcon/extcon-arizona.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/extcon/extcon-arizona.c +1 -1
index 7a1b4a7..4df68de 100644
@@ -1034,6 +1034,7 @@ static irqreturn_t arizona_jackdet(int irq, void *data)
 	else
 		info->micd_timeout = DEFAULT_MICD_TIMEOUT;
 
+out:
 	/* Clear trig_sts to make sure DCVDD is not forced up */
 	regmap_write(arizona->regmap, ARIZONA_AOD_WKUP_AND_TRIG,
 		     ARIZONA_MICD_CLAMP_FALL_TRIG_STS |
@@ -1041,7 +1042,6 @@ static irqreturn_t arizona_jackdet(int irq, void *data)
 		     ARIZONA_JD1_FALL_TRIG_STS |
 		     ARIZONA_JD1_RISE_TRIG_STS);
 
-out:
 	mutex_unlock(&info->lock);
 
 	pm_runtime_mark_last_busy(info->dev);
Signature · 1 line
1.7.2.5
maintainer
#1 lore raw

Hi Charles,

Quoted 26 lines · Charles Keepax

We want the trig_sts bits to be cleared in all cases where we consider the jack detection interrupt to have been handled. Specifically, if a duplicate detection event was suppressed these bits were not cleared causing the CODEC to not enter a low power state. This patch clears the bits on the duplicate detection code path.

---
 drivers/extcon/extcon-arizona.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/extcon/extcon-arizona.c +1 -0
index 7a1b4a7..4df68de 100644
@@ -1034,6 +1034,7 @@ static irqreturn_t arizona_jackdet(int irq, void *data)
 	else
 		info->micd_timeout = DEFAULT_MICD_TIMEOUT;
 
+out:
 	/* Clear trig_sts to make sure DCVDD is not forced up */
 	regmap_write(arizona->regmap, ARIZONA_AOD_WKUP_AND_TRIG,
 		     ARIZONA_MICD_CLAMP_FALL_TRIG_STS |

drivers/extcon/extcon-arizona.c static irqreturn_t arizona_jackdet(int irq, void *data) · line 1047

Quoted 7 lines
drivers/extcon/extcon-arizona.c +0 -1
@@ -1041,7 +1042,6 @@ static irqreturn_t arizona_jackdet(int irq, void *data)
 		     ARIZONA_JD1_FALL_TRIG_STS |
 		     ARIZONA_JD1_RISE_TRIG_STS);
 
-out:
 	mutex_unlock(&info->lock);
 
 	pm_runtime_mark_last_busy(info->dev);

Applied it.

Thanks.
Chanwoo Choi