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