summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/input/misc/ab8500-accdet.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/input/misc/ab8500-accdet.c b/drivers/input/misc/ab8500-accdet.c
index bb2748b7668..21d00b82165 100644
--- a/drivers/input/misc/ab8500-accdet.c
+++ b/drivers/input/misc/ab8500-accdet.c
@@ -1352,6 +1352,10 @@ static int ab8500_acc_detect_suspend(struct platform_device *pdev,
AB8500_ECI_AV_ACC,
AB8500_ACC_DET_CTRL_REG,
0);
+
+ if (dd->jack_type == JACK_TYPE_HEADSET)
+ accessory_regulator_disable(REGULATOR_VAMIC1);
+
return 0;
}
@@ -1362,6 +1366,9 @@ static int ab8500_acc_detect_resume(struct platform_device *pdev)
dev_dbg(&dd->pdev->dev, "%s: Enter\n", __func__);
+ if (dd->jack_type == JACK_TYPE_HEADSET)
+ accessory_regulator_enable(REGULATOR_VAMIC1);
+
/* Turn on AccDetect comparators and pull-up */
(void) abx500_set_register_interruptible(
&dd->pdev->dev,