Commit 8c3b55a2 authored by Linus Walleij's avatar Linus Walleij Committed by Dmitry Torokhov

Input: atmel_mxt_ts - fix lost interrupts

After commit 74d905d2 devices requiring the workaround for edge
triggered interrupts stopped working.

The hardware needs the quirk to be used before even proceeding to
check if the quirk is needed because mxt_acquire_irq() is called
before mxt_check_retrigen() is called and at this point pending IRQs
need to be checked, and if the workaround is not active, all
interrupts will be lost from this point.

Solve this by switching the calls around.
Reported-by: default avatarAndre Müller <andre.muller@web.de>
Tested-by: default avatarAndre Müller <andre.muller@web.de>
Suggested-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
Fixes: 74d905d2 ("Input: atmel_mxt_ts - only read messages in mxt_acquire_irq() when necessary")
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20201201123026.1416743-1-linus.walleij@linaro.orgSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 2aab1561
......@@ -2183,11 +2183,11 @@ static int mxt_initialize(struct mxt_data *data)
msleep(MXT_FW_RESET_TIME);
}
error = mxt_acquire_irq(data);
error = mxt_check_retrigen(data);
if (error)
return error;
error = mxt_check_retrigen(data);
error = mxt_acquire_irq(data);
if (error)
return error;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment