提交 a3e00d4b 编写于 作者: C Charles Keepax 提交者: Chanwoo Choi

extcon: arizona: Fix reset of HPDET after race with removal

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: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
上级 ffae24fe
......@@ -603,9 +603,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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册