Input: goodix - disable IRQs while suspended
authorHans de Goede <hdegoede@redhat.com>
Fri, 12 Jan 2018 08:36:48 +0000 (00:36 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 12 Jan 2018 08:42:47 +0000 (00:42 -0800)
commitfaec44b6838312484d63e82286087cf2d5ebb891
treef9cc3b18a0f0b4289c2507b019677b27a29e988c
parent152194fe9c3f03232b9c0d0264793a7fa4af82f8
Input: goodix - disable IRQs while suspended

We should not try to do any i2c transfers before the controller is
resumed (which happens before our resume method gets called).

So we need to disable our IRQ while suspended to enforce this. The
code paths for devices with GPIOs for the int and reset pins already
disable the IRQ the through goodix_free_irq().

This commit also disables the IRQ while suspended for devices without
GPIOs for the int and reset pins.

This fixes the i2c bus sometimes getting stuck after a suspend/resume
causing the touchscreen to sometimes not work after a suspend/resume.
This has been tested on a GPD pocked device.

BugLink: https://github.com/nexus511/gpd-ubuntu-packages/issues/10
BugLink: https://www.reddit.com/r/GPDPocket/comments/7niut2/fix_for_broken_touch_after_resume_all_linux/
Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/goodix.c