aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/extcon/extcon-arizona.c
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>2013-11-14 11:18:22 -0500
committerChanwoo Choi <cw00.choi@samsung.com>2014-01-06 21:54:28 -0500
commita3e00d4bd8011f2fe5100e1a0d3a01cc2afaa187 (patch)
tree1076c6c4bead6f9e5a6c3f4b53ed343b54ae8570 /drivers/extcon/extcon-arizona.c
parentffae24fed8a83afd5682865e0262731eac369a5b (diff)
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: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/extcon/extcon-arizona.c')
-rw-r--r--drivers/extcon/extcon-arizona.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
index 5775f055bd02..fefb8563db9e 100644
--- a/drivers/extcon/extcon-arizona.c
+++ b/drivers/extcon/extcon-arizona.c
@@ -603,9 +603,15 @@ static irqreturn_t arizona_hpdet_irq(int irq, void *data)
603 dev_err(arizona->dev, "Failed to report HP/line: %d\n", 603 dev_err(arizona->dev, "Failed to report HP/line: %d\n",
604 ret); 604 ret);
605 605
606done:
607 /* Reset back to starting range */
608 regmap_update_bits(arizona->regmap,
609 ARIZONA_HEADPHONE_DETECT_1,
610 ARIZONA_HP_IMPEDANCE_RANGE_MASK | ARIZONA_HP_POLL,
611 0);
612
606 arizona_extcon_do_magic(info, 0); 613 arizona_extcon_do_magic(info, 0);
607 614
608done:
609 if (id_gpio) 615 if (id_gpio)
610 gpio_set_value_cansleep(id_gpio, 0); 616 gpio_set_value_cansleep(id_gpio, 0);
611 617