From 01a4f7f188ea3d622212ed0848164a396e4821ae Mon Sep 17 00:00:00 2001 From: Virupax Sadashivpetimath Date: Thu, 7 Jul 2011 16:25:59 +0530 Subject: ab8500-accdet: Disable vamic1 in suspend Since the button press detection is not needed in suspend, disable the V-amic1 incase of a Headset connected to the board. ST-Ericsson ID: 351150 ST-Ericsson Linux next: - ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I24fcaddcd404605d19ea113fd1d2bbf888e2fb62 Signed-off-by: Virupax Sadashivpetimath Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/26726 Reviewed-by: QATEST Reviewed-by: Srinidhi KASAGAR --- drivers/input/misc/ab8500-accdet.c | 7 +++++++ 1 file changed, 7 insertions(+) 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, -- cgit v1.2.3