Revert "(CR) cap-sensor: Optimize power consumption issue."

ABOV_CTRL_MODE_RET is defined in abov_sar.h,
and in abov_sar_a96t.h file, the register name has changed to ABOV_CTRL_MODE_REG.

It will cause build error. Now revert it, and resubmit it.

This reverts commit 16143ccfc41d9c80827615fdd060fd6f72a41c82.

Change-Id: I3605f0df5c3d6b3c1e38f01c8111bcd536044948
Reviewed-on: https://gerrit.mot.com/1411231
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Jianqiu Huang 2019-08-27 04:02:39 -05:00
commit 70666d5d9b

View file

@ -1855,19 +1855,12 @@ void abovXX_suspend(pabovXX_t this)
if (this) {
LOG_INFO("ABOV suspend: disable irq!\n");
disable_irq(this->irq);
/* if upper layer don't disable capsensor, */
/* we should let it enter sleep in suspend. */
if (mEnabled)
write_register(this, ABOV_CTRL_MODE_RET, 0x02);
}
}
void abovXX_resume(pabovXX_t this)
{
if (this) {
LOG_INFO("ABOV resume: enable irq!\n");
/* we should let capsensor enter active in resume*/
if (mEnabled)
write_register(this, ABOV_CTRL_MODE_RET, 0x00);
enable_irq(this->irq);
}
}