linux/drivers/pinctrl/intel
Mika Westerberg 05c9297f34 pinctrl: intel: Initialize GPIO properly when used through irqchip
commit f5a26acf01 upstream.

When a GPIO is requested using gpiod_get_* APIs the intel pinctrl driver
switches the pin to GPIO mode and makes sure interrupts are routed to
the GPIO hardware instead of IOAPIC. However, if the GPIO is used
directly through irqchip, as is the case with many I2C-HID devices where
I2C core automatically configures interrupt for the device, the pin is
not initialized as GPIO. Instead we rely that the BIOS configures the
pin accordingly which seems not to be the case at least in Asus X540NA
SKU3 with Focaltech touchpad.

When the pin is not properly configured it might result weird behaviour
like interrupts suddenly stop firing completely and the touchpad stops
responding to user input.

Fix this by properly initializing the pin to GPIO mode also when it is
used directly through irqchip.

Fixes: 7981c0015a ("pinctrl: intel: Add Intel Sunrisepoint pin controller and GPIO support")
Reported-by: Daniel Drake <drake@endlessm.com>
Reported-and-tested-by: Chris Chiu <chiu@endlessm.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2018-02-16 20:23:08 +01:00
..
Kconfig pinctrl: intel: Add Intel Lewisburg GPIO support 2017-08-22 15:42:19 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pinctrl-baytrail.c pinctrl: baytrail: Do not call WARN_ON for a firmware bug 2017-08-14 15:01:01 +02:00
pinctrl-broxton.c pinctrl: broxton: No need to take pointer of a pointer 2017-01-30 14:45:12 +01:00
pinctrl-cannonlake.c pinctrl: intel: Add Intel Cannon Lake PCH-H pin controller support 2017-08-22 15:41:25 +02:00
pinctrl-cherryview.c pinctrl: cherryview: Mask all interrupts on Intel_Strago based systems 2017-12-29 17:53:48 +01:00
pinctrl-denverton.c pinctrl: intel: Add Intel Denverton pin controller support 2017-08-14 15:01:59 +02:00
pinctrl-geminilake.c pinctrl: intel: Add Intel Gemini Lake pin controller support 2017-01-30 15:06:01 +01:00
pinctrl-intel.c pinctrl: intel: Initialize GPIO properly when used through irqchip 2018-02-16 20:23:08 +01:00
pinctrl-intel.h pinctrl: intel: Make it possible to specify mode per pin in a group 2017-06-09 13:02:50 +02:00
pinctrl-lewisburg.c pinctrl: intel: Add Intel Lewisburg GPIO support 2017-08-22 15:42:19 +02:00
pinctrl-merrifield.c pinctrl: intel: merrifield: Correct UART pin lists 2017-08-07 15:23:11 +02:00
pinctrl-sunrisepoint.c pinctrl: intel: Add support for variable size pad groups 2017-06-09 13:01:35 +02:00