]> git.baikalelectronics.ru Git - kernel.git/commit
pinctrl: intel: Save and restore pins in "direct IRQ" mode
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 24 Nov 2022 22:29:26 +0000 (00:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Dec 2022 10:23:04 +0000 (11:23 +0100)
commitb9b5f06cc0eea85537c8995aabd958f6eb394fe4
tree180ca5e088547458dfd57f51ad90e92ef3d775e3
parent9218b8cbd57cba143afbb8614927d2a921041221
pinctrl: intel: Save and restore pins in "direct IRQ" mode

commit 2bf77a3e54e27ad0f7d00f061fa9ad51c542b809 upstream.

The firmware on some systems may configure GPIO pins to be
an interrupt source in so called "direct IRQ" mode. In such
cases the GPIO controller driver has no idea if those pins
are being used or not. At the same time, there is a known bug
in the firmwares that don't restore the pin settings correctly
after suspend, i.e. by an unknown reason the Rx value becomes
inverted.

Hence, let's save and restore the pins that are configured
as GPIOs in the input mode with GPIROUTIOXAPIC bit set.

Cc: stable@vger.kernel.org
Reported-and-tested-by: Dale Smith <dalepsmith@gmail.com>
Reported-and-tested-by: John Harris <jmharris@gmail.com>
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=214749
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Link: https://lore.kernel.org/r/20221124222926.72326-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pinctrl/intel/pinctrl-intel.c