]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Input: edt-ft5x06 - adjust delays to conform datasheet
authorLothar Waßmann <LW@KARO-electronics.de>
Fri, 28 Mar 2014 16:27:50 +0000 (09:27 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 28 Mar 2014 16:33:05 +0000 (09:33 -0700)
The FT5x06 datasheet specifies a minimum reset width of 5ms and a
delay between deassertion of reset and start of reporting of 300ms.
Adjust the delays to conform to the datasheet.

With the original delays I sometimes experienced communication
timeouts when initializing the controller.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Acked-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/edt-ft5x06.c

index 9d61f1e36b33b5b8509adb67c841e63048345471..fd18e580870aba1cf341f894c94d96ce301a27d9 100644 (file)
@@ -635,7 +635,7 @@ static int edt_ft5x06_ts_reset(struct i2c_client *client,
                        return error;
                }
 
-               mdelay(5);
+               msleep(5);
                gpio_set_value(tsdata->wake_pin, 1);
        }
        if (gpio_is_valid(tsdata->reset_pin)) {
@@ -650,9 +650,9 @@ static int edt_ft5x06_ts_reset(struct i2c_client *client,
                        return error;
                }
 
-               mdelay(50);
+               msleep(5);
                gpio_set_value(tsdata->reset_pin, 1);
-               mdelay(100);
+               msleep(300);
        }
 
        return 0;