input: touchscreen: gt1x: Enable GTP_POWER_CTRL_SLEEP

According to gt1x_generic.h, the GTP_POWER_CTRL_SLEEP is for
"turn off power on suspend" case.

And we're turning off TS's power on suspend actually.

Change-Id: I2a8ec852a96beb01d6e4d6cfd4f3e94ef0185608
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
This commit is contained in:
Jeffy Chen
2018-06-15 12:12:54 +08:00
committed by Tao Huang
parent 4ff3c391f0
commit e0618aeace
2 changed files with 5 additions and 3 deletions

View File

@@ -439,6 +439,7 @@ s32 _do_i2c_write(struct i2c_msg *msg, u16 addr, u8 *buffer, s32 len)
return 0;
}
#if !GTP_POWER_CTRL_SLEEP
#if !GTP_ESD_PROTECT
static s32 gt1x_i2c_test(void)
{
@@ -462,6 +463,7 @@ static s32 gt1x_i2c_test(void)
return ERROR_RETRY;
}
#endif
#endif
/**
* gt1x_i2c_read_dbl_check - read twice and double check
@@ -938,12 +940,12 @@ s32 gt1x_get_chip_type(void)
*/
static s32 gt1x_enter_sleep(void)
{
int ret;
#if GTP_POWER_CTRL_SLEEP
gt1x_power_switch(SWITCH_OFF);
return 0;
#else
{
int ret;
s32 retry = 0;
if (gt1x_wakeup_level == 1) { /* high level wakeup */
GTP_GPIO_OUTPUT(GTP_INT_PORT, 0);
@@ -979,7 +981,7 @@ static s32 gt1x_wakeup_sleep(void)
s32 ret = -1;
int flag = 0;
#endif
s32 ret = -1;
GTP_DEBUG("Wake up begin.");
gt1x_irq_disable();
ret = regulator_enable(gt1x_supply);

View File

@@ -82,7 +82,7 @@
#define GTP_WITH_STYLUS 0 /* pen support */
#define GTP_HAVE_STYLUS_KEY 0
#define GTP_POWER_CTRL_SLEEP 0 /* turn off power on suspend */
#define GTP_POWER_CTRL_SLEEP 1 /* turn off power on suspend */
#define GTP_ICS_SLOT_REPORT 0
#define GTP_CREATE_WR_NODE 0 /* create the interface to support gtp_tools */
#define GTP_DEBUG_NODE 0