HACK: Input: elants_i2c - clear interrupt at resume

If a device is using edge-triggered interrupt, then, when it gets
enabled with enable_irq(), and edge came while interrupt was disabled,
the kernel is supposed to replay the interrupt. Unfortunately it does
not seem to happen on some devices. As a workaround, let's read and
discard the data from the device, so interrupt is cleared before it is

TEST=Suspend/resume on different version of Candy, ensure touchscreen

Change-Id: Ic38ab11f842dec2c12de71593113f89c120ad839
Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/517282
Reviewed-by: Benson Leung <bleung@chromium.org>
(cherry picked from commit f495ada03ddc7b546850cd0d0f9b29baf364c02e)
Reviewed-on: https://chromium-review.googlesource.com/518000
Reviewed-by: Guenter Roeck <groeck@chromium.org>
1 file changed