From 070ccdf3fa6e1ef21c0d8f4da2fe88ce6ecad66b Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=83=AD=E6=AF=85?= Date: Mon, 21 Apr 2014 09:41:48 +0800 Subject: [PATCH] tp: fix sometimes resume too long cause by tp bug auther : zyk --- drivers/input/touchscreen/ct36x/ct363.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/ct36x/ct363.c b/drivers/input/touchscreen/ct36x/ct363.c index b2e293d814dc..65ebfb5783f5 100755 --- a/drivers/input/touchscreen/ct36x/ct363.c +++ b/drivers/input/touchscreen/ct36x/ct363.c @@ -133,12 +133,13 @@ static void ct363_deinit(struct ct36x_data *ts) return; } +int ct363_first_init_flag = 1; static int ct363_suspend(struct ct36x_data *ts) { int ret = 0; ret = ct36x_chip_go_sleep(ts); - + ct363_first_init_flag=0; if(ret < 0) dev_warn(ts->dev, "CT363 chip: failed to go to sleep\n"); return ret; @@ -149,9 +150,17 @@ static int ct363_resume(struct ct36x_data *ts) int i; /* Hardware reset */ - ct363_reset_hw(ts); - msleep(3); - + if(ct363_first_init_flag) + ct363_reset_hw(ts); + else + { + // gpio_direction_output(ts->rst_io.gpio, ts->rst_io.active_low); + // msleep(50); + gpio_set_value(ts->rst_io.gpio, !ts->rst_io.active_low); + msleep(50); + gpio_set_value(ts->rst_io.gpio, ts->rst_io.active_low); + msleep(50); + } for(i = 0; i < ts->point_num; i++){ input_mt_slot(ts->input, i); input_mt_report_slot_state(ts->input, MT_TOOL_FINGER, false); -- 2.34.1