touch: Enable and Disable voltages

Added regulator API's for enablement and disablement of voltages for
touch during SUSPEND and RESUME states.

Change-Id: Idfb0f0890700576acb15dfc11fa0118ed8fa94ee
Signed-off-by: Srikanth Katteboina <quic_skattebo@quicinc.com>
这个提交包含在:
Srikanth Katteboina
2022-09-16 18:43:55 +05:30
提交者 ppadasal
父节点 d66a17ccb3
当前提交 4f002c78b1

查看文件

@@ -1332,6 +1332,7 @@ exit_error:
static void raydium_ts_do_suspend(void)
{
unsigned char u8_i = 0;
int rc;
if (g_u8_raw_data_type == 0)
g_u8_resetflag = false;
@@ -1340,6 +1341,14 @@ static void raydium_ts_do_suspend(void)
return;
}
rc = raydium_enable_regulator(g_raydium_ts, false);
if (rc < 0) {
LOGD(LOG_ERR, "[touch]%s:Failed to disable regulators:rc=%d\n",
__func__, rc);
}
LOGD(LOG_INFO, "[touch]%s:voltage regulators disabled:rc=%d\n",
__func__, rc);
/*#ifndef GESTURE_EN*/
raydium_irq_control(DISABLE);
/*#endif*/
@@ -1420,6 +1429,13 @@ static void raydium_ts_do_resume(void)
g_u8_checkflag = false;
}
#endif
rc = raydium_enable_regulator(g_raydium_ts, true);
if (rc < 0) {
LOGD(LOG_ERR, "[touch]%s:Failed to disable regulators:rc=%d\n",
__func__, rc);
}
LOGD(LOG_INFO, "[touch]%s:voltage regulators disabled:rc=%d\n",
__func__, rc);
raydium_irq_control(ENABLE);
#ifdef GESTURE_EN
if (device_may_wakeup(&g_raydium_ts->client->dev)) {