Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 885f3fb9 authored by Nick Dyer's avatar Nick Dyer Committed by Dmitry Torokhov
Browse files

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: default avatarNick Dyer <nick.dyer@itdev.co.uk>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 20447664
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -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)