From 64470199e37f8b3e8972171f4efc4c0c3377c98d 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(+) (limited to 'drivers/input') diff --git a/drivers/input/misc/ab8500-accdet.c b/drivers/input/misc/ab8500-accdet.c index 3bb898503e7..cff9b78847b 100644 --- a/drivers/input/misc/ab8500-accdet.c +++ b/drivers/input/misc/ab8500-accdet.c @@ -1353,6 +1353,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; } @@ -1363,6 +1367,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