From 7233392578f916e3f56bd5cab3578bdb43bf7798 Mon Sep 17 00:00:00 2001 From: Shantanu Jain Date: Fri, 23 Oct 2015 11:23:12 +0530 Subject: [PATCH] input: touchscreen: add delay after enabling regulators ITE tech touch controller needs a delay to come to an active state after regulators are enabled and do any i2c transactions. So this change adds a delay for the same. Change-Id: Ifd7c936d8f5d364b78c64aeebd1517d49a5b8936 Signed-off-by: Shantanu Jain --- drivers/input/touchscreen/it7258_ts_i2c.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/input/touchscreen/it7258_ts_i2c.c b/drivers/input/touchscreen/it7258_ts_i2c.c index 1fa28f1f0d9d..5f1da30ecd88 100644 --- a/drivers/input/touchscreen/it7258_ts_i2c.c +++ b/drivers/input/touchscreen/it7258_ts_i2c.c @@ -128,6 +128,7 @@ #define IT_I2C_VTG_MIN_UV 2600000 #define IT_I2C_VTG_MAX_UV 3300000 #define IT_I2C_ACTIVE_LOAD_UA 10000 +#define DELAY_VTG_REG_EN 170 #define PINCTRL_STATE_ACTIVE "pmx_ts_active" #define PINCTRL_STATE_SUSPEND "pmx_ts_suspend" @@ -1619,6 +1620,12 @@ static int IT7260_ts_probe(struct i2c_client *client, goto err_power_device; } + /* + * After enabling regulators, controller needs a delay to come to + * an active state. + */ + msleep(DELAY_VTG_REG_EN); + ret = IT7260_ts_pinctrl_init(gl_ts); if (!ret && gl_ts->ts_pinctrl) { /*