Skip to content

Commit 5d9ab70

Browse files
charleskeepaxbroonie
authored andcommitted
extcon: arizona: Clear _trig_sts bits after jack detection
It is important to clear the wake trigger status bits otherwise DCVDD will be held high independent of the state of the LDOENA line. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
1 parent 903aa56 commit 5d9ab70

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

‎drivers/extcon/extcon-arizona.c‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -939,6 +939,13 @@ static irqreturn_t arizona_jackdet(int irq, void *data)
939939
ARIZONA_MICD_CLAMP_DB | ARIZONA_JD1_DB);
940940
}
941941

942+
/* Clear trig_sts to make sure DCVDD is not forced up */
943+
regmap_write(arizona->regmap, ARIZONA_AOD_WKUP_AND_TRIG,
944+
ARIZONA_MICD_CLAMP_FALL_TRIG_STS |
945+
ARIZONA_MICD_CLAMP_RISE_TRIG_STS |
946+
ARIZONA_JD1_FALL_TRIG_STS |
947+
ARIZONA_JD1_RISE_TRIG_STS);
948+
942949
mutex_unlock(&info->lock);
943950

944951
pm_runtime_mark_last_busy(info->dev);

‎include/linux/mfd/arizona/registers.h‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5267,6 +5267,14 @@
52675267
/*
52685268
* R3408 (0xD50) - AOD wkup and trig
52695269
*/
5270+
#define ARIZONA_MICD_CLAMP_FALL_TRIG_STS 0x0080 /* MICD_CLAMP_FALL_TRIG_STS */
5271+
#define ARIZONA_MICD_CLAMP_FALL_TRIG_STS_MASK 0x0080 /* MICD_CLAMP_FALL_TRIG_STS */
5272+
#define ARIZONA_MICD_CLAMP_FALL_TRIG_STS_SHIFT 7 /* MICD_CLAMP_FALL_TRIG_STS */
5273+
#define ARIZONA_MICD_CLAMP_FALL_TRIG_STS_WIDTH 1 /* MICD_CLAMP_FALL_TRIG_STS */
5274+
#define ARIZONA_MICD_CLAMP_RISE_TRIG_STS 0x0040 /* MICD_CLAMP_RISE_TRIG_STS */
5275+
#define ARIZONA_MICD_CLAMP_RISE_TRIG_STS_MASK 0x0040 /* MICD_CLAMP_RISE_TRIG_STS */
5276+
#define ARIZONA_MICD_CLAMP_RISE_TRIG_STS_SHIFT 6 /* MICD_CLAMP_RISE_TRIG_STS */
5277+
#define ARIZONA_MICD_CLAMP_RISE_TRIG_STS_WIDTH 1 /* MICD_CLAMP_RISE_TRIG_STS */
52705278
#define ARIZONA_GP5_FALL_TRIG_STS 0x0020 /* GP5_FALL_TRIG_STS */
52715279
#define ARIZONA_GP5_FALL_TRIG_STS_MASK 0x0020 /* GP5_FALL_TRIG_STS */
52725280
#define ARIZONA_GP5_FALL_TRIG_STS_SHIFT 5 /* GP5_FALL_TRIG_STS */

0 commit comments

Comments
 (0)