From 2118788ec895ce382c3c08436c60ebdca90f855d Mon Sep 17 00:00:00 2001 From: zyk <“zyk@rock-chips.com”> Date: Wed, 26 Mar 2014 15:29:42 +0800 Subject: [PATCH] tp ct36x: reduce init time --- drivers/input/touchscreen/ct36x/core.c | 2 +- drivers/input/touchscreen/ct36x/ct363.c | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/input/touchscreen/ct36x/core.c b/drivers/input/touchscreen/ct36x/core.c index 66fca4cc4032..c65a5c86589e 100755 --- a/drivers/input/touchscreen/ct36x/core.c +++ b/drivers/input/touchscreen/ct36x/core.c @@ -208,7 +208,7 @@ int ct36x_chip_get_fwchksum(struct ct36x_data *ts) ret = ct36x_write(ts, buf, 2); if(ret < 0) return ret; - mdelay(500); + mdelay(350); buf[0] = 0xFF; buf[1] = 0x8E; diff --git a/drivers/input/touchscreen/ct36x/ct363.c b/drivers/input/touchscreen/ct36x/ct363.c index b2e293d814dc..1a976a77ca0e 100755 --- a/drivers/input/touchscreen/ct36x/ct363.c +++ b/drivers/input/touchscreen/ct36x/ct363.c @@ -53,12 +53,12 @@ static void ct363_deinit_hw(struct ct36x_data *ts) static void ct363_reset_hw(struct ct36x_data *ts) { - gpio_direction_output(ts->rst_io.gpio, ts->rst_io.active_low); - msleep(50); + //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); + msleep(20); gpio_set_value(ts->rst_io.gpio, ts->rst_io.active_low); - msleep(500); + msleep(255); } static int ct363_init(struct ct36x_data *ts) @@ -107,9 +107,12 @@ static int ct363_init(struct ct36x_data *ts) } /* Hardware reset */ - ct363_reset_hw(ts); - msleep(5); - + //ct363_reset_hw(ts); + //msleep(5); + gpio_set_value(ts->rst_io.gpio, !ts->rst_io.active_low); + msleep(10); + gpio_set_value(ts->rst_io.gpio, ts->rst_io.active_low); + msleep(30); ts->point_num = CT363_POINT_NUM; ct363 = kzalloc(sizeof(struct ct363_priv), GFP_KERNEL); -- 2.34.1