diff options
author | Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com> | 2011-07-07 16:25:59 +0530 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@stericsson.com> | 2011-09-19 16:00:12 +0200 |
commit | 64470199e37f8b3e8972171f4efc4c0c3377c98d (patch) | |
tree | f035a609d6da338031da8f0414540563c1269807 /drivers/input | |
parent | df38938267f11f89ec271d88729d590e3538fed6 (diff) |
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 <virupax.sadashivpetimath@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/26726
Reviewed-by: QATEST
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/misc/ab8500-accdet.c | 7 |
1 files changed, 7 insertions, 0 deletions
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, |