touch: pt: disable power off feature
enable touch to wake feature for all power modes. Change-Id: Ic12fb06cb3d436d41f373f57eaee91c5f20a11eb Signed-off-by: Srinu Gorle <quic_sgorle@quicinc.com> Signed-off-by: Anand Abhishek <quic_anandabh@quicinc.com>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
9837fef63e
commit
9ec2c285b6
40
pt/pt_core.c
40
pt/pt_core.c
@@ -10834,21 +10834,27 @@ static int pt_core_suspend_(struct device *dev)
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
static int pt_core_suspend(struct device *dev)
|
static int pt_core_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
struct pt_core_data *cd = dev_get_drvdata(dev);
|
struct pt_core_data *cd = dev_get_drvdata(dev);
|
||||||
int rc = 0;
|
int rc = 0, status = 0;
|
||||||
|
|
||||||
if (cd->cpdata->flags & PT_CORE_FLAG_SKIP_SYS_SLEEP)
|
if (cd->cpdata->flags & PT_CORE_FLAG_SKIP_SYS_SLEEP)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
cancel_work_sync(&cd->resume_offload_work);
|
pt_debug(cd->dev, DL_INFO, "%s start\n", __func__);
|
||||||
cancel_work_sync(&cd->suspend_offload_work);
|
cancel_work_sync(&cd->resume_work);
|
||||||
cancel_work_sync(&cd->resume_work);
|
cancel_work_sync(&cd->suspend_work);
|
||||||
cancel_work_sync(&cd->suspend_work);
|
|
||||||
|
|
||||||
rc = pt_core_suspend_(cd->dev);
|
rc = pt_core_easywake_on(cd);
|
||||||
pt_debug(cd->dev, DL_INFO, "%s Exit - rc = %d\n", __func__, rc);
|
if (rc < 0) {
|
||||||
|
pt_debug(cd->dev, DL_ERROR, "%s: Error on sleep\n", __func__);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
cd->fb_state = FB_OFF;
|
||||||
|
|
||||||
return rc;
|
status = pt_enable_i2c_regulator(cd, false);
|
||||||
|
pt_debug(cd->dev, DL_INFO, "%s Exit - rc = %d\n", __func__, status);
|
||||||
|
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
@@ -11016,17 +11022,15 @@ static void pt_resume_offload_work(struct work_struct *work)
|
|||||||
static int pt_core_resume(struct device *dev)
|
static int pt_core_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
struct pt_core_data *cd = dev_get_drvdata(dev);
|
struct pt_core_data *cd = dev_get_drvdata(dev);
|
||||||
int rc = 0;
|
int rc = 0, status = 0;
|
||||||
if (cd->cpdata->flags & PT_CORE_FLAG_SKIP_SYS_SLEEP)
|
if (cd->cpdata->flags & PT_CORE_FLAG_SKIP_SYS_SLEEP)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
cancel_work_sync(&cd->resume_offload_work);
|
pt_debug(cd->dev, DL_INFO, "%s start\n", __func__);
|
||||||
cancel_work_sync(&cd->suspend_offload_work);
|
status = pt_enable_i2c_regulator(cd, true);
|
||||||
cancel_work_sync(&cd->resume_work);
|
pt_debug(cd->dev, DL_INFO, "%s i2c regulator rc %d\n", __func__, status);
|
||||||
cancel_work_sync(&cd->suspend_work);
|
|
||||||
|
|
||||||
queue_work(cd->pt_workqueue, &cd->resume_offload_work);
|
pt_debug(cd->dev, DL_INFO, "%s End\n", __func__);
|
||||||
pt_debug(cd->dev, DL_INFO, "%s workqueued\n", __func__);
|
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user