mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
sc760x: Enter Low power mode when system suspend
Entering Low power mode when system suspend Exiting Low power mode when system resume Change-Id: If809ab448e6b294c1dcd0b6186aaaeeeadb4aca7 Signed-off-by: xuwt2 <xuwt2@lenovo.com> Reviewed-on: https://gerrit.mot.com/2642143 Reviewed-by: litong <litong20@motorola.com> SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Guobin Zhang <zhanggb@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
53c07ddb44
commit
687d73d12d
1 changed files with 12 additions and 1 deletions
|
|
@ -2090,7 +2090,12 @@ static int sc760x_suspend(struct device *dev)
|
|||
disable_irq(sc->irq);
|
||||
ret = sc760x_set_adc_enable(sc, false);
|
||||
if (ret < 0) {
|
||||
dev_err(sc->dev, "%s Failed to enable adc(%d)\n", __func__, ret);
|
||||
dev_err(sc->dev, "%s Failed to disable adc(%d)\n", __func__, ret);
|
||||
}
|
||||
|
||||
ret = sc760x_set_lowpower_mode(sc, true);
|
||||
if (ret < 0) {
|
||||
dev_err(sc->dev, "%s Failed to enter lowpower(%d)\n", __func__, ret);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
@ -2103,6 +2108,12 @@ static int sc760x_resume(struct device *dev)
|
|||
if (device_may_wakeup(dev))
|
||||
disable_irq_wake(sc->irq);
|
||||
enable_irq(sc->irq);
|
||||
|
||||
ret = sc760x_set_lowpower_mode(sc, false);
|
||||
if (ret < 0) {
|
||||
dev_err(sc->dev, "%s Failed to exit lowpower(%d)\n", __func__, ret);
|
||||
}
|
||||
|
||||
ret = sc760x_set_adc_enable(sc, true);
|
||||
if (ret < 0) {
|
||||
dev_err(sc->dev, "%s Failed to enable adc(%d)\n", __func__, ret);
|
||||
|
|
|
|||
Loading…
Reference in a new issue