aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/atmel_mxt_ts.c
diff options
context:
space:
mode:
authorNick Dyer <nick.dyer@itdev.co.uk>2015-08-04 16:57:25 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2015-08-04 17:03:54 -0700
commit885f3fb9fa1f9e185e8a4e905157087495734349 (patch)
treec5a51e9357eddd56eecf1dc197cf0568c405fdbe /drivers/input/touchscreen/atmel_mxt_ts.c
parentInput: atmel_mxt_ts - improve device tree parsing (diff)
downloadlinux-dev-885f3fb9fa1f9e185e8a4e905157087495734349.tar.xz
linux-dev-885f3fb9fa1f9e185e8a4e905157087495734349.zip
Input: atmel_mxt_ts - disable interrupt for 50ms after reset
The CHG/interrupt line is momentarily set (approximately 100 ms) as an input after power-up or reset for diagnostic purposes. This may cause spurious interrupts, so disable interrupt handler during this period. Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to '')
-rw-r--r--drivers/input/touchscreen/atmel_mxt_ts.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 08d9a0921798..d36da65f8c72 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -1098,7 +1098,9 @@ static int mxt_soft_reset(struct mxt_data *data)
struct device *dev = &data->client->dev;
int ret = 0;
- dev_info(dev, "Resetting chip\n");
+ dev_info(dev, "Resetting device\n");
+
+ disable_irq(data->irq);
reinit_completion(&data->reset_completion);
@@ -1106,6 +1108,11 @@ static int mxt_soft_reset(struct mxt_data *data)
if (ret)
return ret;
+ /* Ignore CHG line for 100ms after reset */
+ msleep(100);
+
+ enable_irq(data->irq);
+
ret = mxt_wait_for_completion(data, &data->reset_completion,
MXT_RESET_TIMEOUT);
if (ret)