diff options
author | Zhang Jiejing <jiejing.zhang@freescale.com> | 2012-03-08 17:28:02 +0800 |
---|---|---|
committer | Zhang Jiejing <jiejing.zhang@freescale.com> | 2012-03-08 17:39:21 +0800 |
commit | 8fdc1d60ec595765f9fcd03e1ed2f7dab000766f (patch) | |
tree | 95a25681fde43d5af613d12ccf1ed54602603508 | |
parent | 69a4a2f4b948ba3744ece77efdc4a964e0c2f424 (diff) |
ENGR00175841 input: egalax_ts: fix touch can't work after suspend and reset.
if reset board during suspend, the controller can't success read
firmware version, it due to the chip needs some time to wake up, so
add 10 ms delay after wakeup chip in probe function.
don't need add delay in other code path, since the time was too short
to noticed in normal suspend/resume sequency.
Signed-off-by: Zhang Jiejing <jiejing.zhang@freescale.com>
-rw-r--r-- | drivers/input/touchscreen/egalax_ts.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/egalax_ts.c b/drivers/input/touchscreen/egalax_ts.c index 04c92e03b8aa..321146efbff3 100644 --- a/drivers/input/touchscreen/egalax_ts.c +++ b/drivers/input/touchscreen/egalax_ts.c @@ -147,6 +147,7 @@ static int egalax_wake_up_device(struct i2c_client *client) return ret; } /* wake up controller via an falling edge on IRQ gpio. */ + gpio_direction_output(gpio, 1); gpio_direction_output(gpio, 0); gpio_set_value(gpio, 1); /* controller should be waken up, return irq. */ @@ -192,6 +193,10 @@ static int __devinit egalax_ts_probe(struct i2c_client *client, data->input_dev = input_dev; /* controller may be in sleep, wake it up. */ egalax_wake_up_device(client); + msleep(10); + /* the controller needs some time to wakeup, otherwise the + * following firmware version read will be failed. + */ ret = egalax_firmware_version(client); if (ret < 0) { dev_err(&client->dev, |