diff options
author | Hans de Goede <hdegoede@redhat.com> | 2020-03-24 19:12:10 +0100 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2020-03-24 23:07:11 +0100 |
commit | 49db3997d82fe51655d75944fa68a08143782a5d (patch) | |
tree | 1e3256d1ded7686f556a4b03d2ab860c6e1d3448 /drivers/ipack | |
parent | Input: elants_i2c - report resolution information for touch major (diff) | |
download | linux-49db3997d82fe51655d75944fa68a08143782a5d.tar.xz linux-49db3997d82fe51655d75944fa68a08143782a5d.zip |
Input: goodix - refactor IRQ pin GPIO accesses
Suspending Goodix touchscreens requires changing the interrupt pin to
output before sending them a power-down command. Followed by wiggling
the interrupt pin to wake the device up, after which it is put back
in input mode.
So far we have only effectively supported this on devices which use
devicetree. On X86 ACPI platforms both looking up the pins; and using a
pin as both IRQ and GPIO is a bit more complicated. E.g. on some devices
we cannot directly access the IRQ pin as GPIO and we need to call ACPI
methods to control it instead.
This commit adds a new irq_pin_access_method field to the goodix_chip_data
struct and adds goodix_irq_direction_output and goodix_irq_direction_input
helpers which together abstract the GPIO accesses to the IRQ pin.
This is a preparation patch for adding support for properly suspending the
touchscreen on X86 ACPI platforms.
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1786317
BugLink: https://github.com/nexus511/gpd-ubuntu-packages/issues/10
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=199207
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Bastien Nocera <hadess@hadess.net>
Link: https://lore.kernel.org/r/20200307121505.3707-1-hdegoede@redhat.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/ipack')
0 files changed, 0 insertions, 0 deletions