[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1384445907-12859-2-git-send-email-ckeepax@opensource.wolfsonmicro.com>
Date: Thu, 14 Nov 2013 16:18:22 +0000
From: Charles Keepax <ckeepax@...nsource.wolfsonmicro.com>
To: cw00.choi@...sung.com
Cc: myungjoo.ham@...sung.com, sameo@...ux.intel.com,
lee.jones@...aro.org, patches@...nsource.wolfsonmicro.com,
linux-kernel@...r.kernel.org,
Charles Keepax <ckeepax@...nsource.wolfsonmicro.com>
Subject: [PATCH v3 2/7] 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@...nsource.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 d611420..61f9d6e 100644
--- a/drivers/extcon/extcon-arizona.c
+++ b/drivers/extcon/extcon-arizona.c
@@ -605,9 +605,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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists