summaryrefslogtreecommitdiff
path: root/drivers/extcon
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-06-28 13:08:31 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-17 09:32:14 -0700
commit9ef2224d9f2e684da016c8a29ecf6dc548b66e3e (patch)
tree205a955b9d3df1011c1c556a93ba26230f160782 /drivers/extcon
parent325c642380fb9a8c628696ed8d64544d73b653ed (diff)
downloadkernel-common-9ef2224d9f2e684da016c8a29ecf6dc548b66e3e.tar.gz
kernel-common-9ef2224d9f2e684da016c8a29ecf6dc548b66e3e.tar.bz2
kernel-common-9ef2224d9f2e684da016c8a29ecf6dc548b66e3e.zip
extcon: arizona: Stop microphone detection if we give up on it
There should be no point in continuing to try to detect a microphone any more so stop doing so. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/extcon')
-rw-r--r--drivers/extcon/extcon-arizona.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
index 0626754d6e04..427a289f32a5 100644
--- a/drivers/extcon/extcon-arizona.c
+++ b/drivers/extcon/extcon-arizona.c
@@ -196,6 +196,8 @@ static irqreturn_t arizona_micdet(int irq, void *data)
if (info->jack_flips >= info->micd_num_modes) {
dev_dbg(arizona->dev, "Detected headphone\n");
info->detecting = false;
+ arizona_stop_mic(info);
+
ret = extcon_set_cable_state_(&info->edev,
ARIZONA_CABLE_HEADPHONE,
true);