tp ct36x: reduce init time
authorzyk <“zyk@rock-chips.com”>
Wed, 26 Mar 2014 07:29:42 +0000 (15:29 +0800)
committerzyk <“zyk@rock-chips.com”>
Wed, 26 Mar 2014 07:29:42 +0000 (15:29 +0800)
drivers/input/touchscreen/ct36x/core.c
drivers/input/touchscreen/ct36x/ct363.c

index 66fca4cc4032a3fb068fc5fdc7c490c718add3ff..c65a5c86589e0b8783e01bc7f8e0270bf93e4e0c 100755 (executable)
@@ -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;
index b2e293d814dcb8035b98c0cc721463a6c6b3fd7d..1a976a77ca0e6f2f17e470489fc0cdf02e764c47 100755 (executable)
@@ -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);