summary refs log tree commit diff
path: root/drivers/ras
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2020-03-24 11:12:10 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2020-03-24 15:07:11 -0700
commit49db3997d82fe51655d75944fa68a08143782a5d (patch)
tree1e3256d1ded7686f556a4b03d2ab860c6e1d3448 /drivers/ras
parent061706716384f1633d3d5090b22a99f33f1fcf2f (diff)
downloadlinux-49db3997d82fe51655d75944fa68a08143782a5d.tar.gz
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/ras')
0 files changed, 0 insertions, 0 deletions