diff options
author | Jeffy Chen <jeffy.chen@rock-chips.com> | 2018-06-15 12:12:54 +0800 |
---|---|---|
committer | Tao Huang <huangtao@rock-chips.com> | 2018-06-20 10:14:32 +0800 |
commit | e0618aeace602f62771f744bb27775ac3bd5b376 (patch) | |
tree | dbda41476d14d4ea4598e1e99f10016b5be4a8df /drivers/input/touchscreen/gt1x | |
parent | 4ff3c391f0cba14ecc2aa1d077e144d6b7ba912a (diff) |
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>
Diffstat (limited to 'drivers/input/touchscreen/gt1x')
-rw-r--r-- | drivers/input/touchscreen/gt1x/gt1x_generic.c | 6 | ||||
-rw-r--r-- | drivers/input/touchscreen/gt1x/gt1x_generic.h | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/drivers/input/touchscreen/gt1x/gt1x_generic.c b/drivers/input/touchscreen/gt1x/gt1x_generic.c index 2a704ae688d9..168b9e94685a 100644 --- a/drivers/input/touchscreen/gt1x/gt1x_generic.c +++ b/drivers/input/touchscreen/gt1x/gt1x_generic.c @@ -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); diff --git a/drivers/input/touchscreen/gt1x/gt1x_generic.h b/drivers/input/touchscreen/gt1x/gt1x_generic.h index d0039022a24a..2b3d40db49cc 100644 --- a/drivers/input/touchscreen/gt1x/gt1x_generic.h +++ b/drivers/input/touchscreen/gt1x/gt1x_generic.h @@ -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 |