Mario Limonciello
326b3f17be
pinctrl: amd: Use amd_pinconf_set() for all config options
commit 635a750d95 upstream.
On ASUS TUF A16 it is reported that the ITE5570 ACPI device connected to
GPIO 7 is causing an interrupt storm. This issue doesn't happen on
Windows.
Comparing the GPIO register configuration between Windows and Linux
bit 20 has been configured as a pull up on Windows, but not on Linux.
Checking GPIO declaration from the firmware it is clear it *should* have
been a pull up on Linux as well.
```
GpioInt (Level, ActiveLow, Exclusive, PullUp, 0x0000,
"\\_SB.GPIO", 0x00, ResourceConsumer, ,)
{ // Pin list
0x0007
}
```
On Linux amd_gpio_set_config() is currently only used for programming
the debounce. Actually the GPIO core calls it with all the arguments
that are supported by a GPIO, pinctrl-amd just responds `-ENOTSUPP`.
To solve this issue expand amd_gpio_set_config() to support the other
arguments amd_pinconf_set() supports, namely `PIN_CONFIG_BIAS_PULL_DOWN`,
`PIN_CONFIG_BIAS_PULL_UP`, and `PIN_CONFIG_DRIVE_STRENGTH`.
Reported-by: Nik P <npliashechnikov@gmail.com>
Reported-by: Nathan Schulte <nmschulte@gmail.com>
Reported-by: Friedrich Vock <friedrich.vock@gmx.de>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217336
Reported-by: dridri85@gmail.com
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217493
Link: https://lore.kernel.org/linux-input/20230530154058.17594-1-friedrich.vock@gmx.de/
Tested-by: Jan Visser <starquake@linuxeverywhere.org>
Fixes: 2956b5d94a ("pinctrl / gpio: Introduce .set_config() callback for GPIO chips")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230705133005.577-3-mario.limonciello@amd.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-23 13:49:30 +02:00
..
2023-01-24 07:24:37 +01:00
2023-06-28 11:12:22 +02:00
2023-05-30 14:03:19 +01:00
2023-06-28 11:12:17 +02:00
2023-03-30 12:49:09 +02:00
2023-03-11 13:55:16 +01:00
2023-07-19 16:21:57 +02:00
2022-10-12 10:23:24 -07:00
2023-06-28 11:12:39 +02:00
2023-06-14 11:15:28 +02:00
2023-07-19 16:21:57 +02:00
2023-07-19 16:21:44 +02:00
2023-07-19 16:21:58 +02:00
2023-07-19 16:20:59 +02:00
2023-01-24 07:24:35 +01:00
2023-04-13 16:55:31 +02:00
2023-07-19 16:21:58 +02:00
2023-05-11 23:03:04 +09:00
2023-07-19 16:21:42 +02:00
2023-05-30 14:03:32 +01:00
2023-07-19 16:21:43 +02:00
2023-01-07 11:11:40 +01:00
2022-12-31 13:32:38 +01:00
2023-06-09 10:34:00 +02:00
2023-02-09 11:28:23 +01:00
2023-06-21 16:00:51 +02:00
2023-07-19 16:22:08 +02:00
2023-02-09 11:27:59 +01:00
2023-07-19 16:21:44 +02:00
2023-05-11 23:03:27 +09:00
2023-02-09 11:28:04 +01:00
2023-06-28 11:12:35 +02:00
2023-07-23 13:49:29 +02:00
2023-07-23 13:49:18 +02:00
2022-12-31 13:32:45 +01:00
2023-05-11 23:03:38 +09:00
2023-06-28 11:12:23 +02:00
2023-07-19 16:21:27 +02:00
2023-07-19 16:21:58 +02:00
2023-07-19 16:22:12 +02:00
2023-07-19 16:21:54 +02:00
2023-04-06 12:10:58 +02:00
2023-07-19 16:21:46 +02:00
2023-07-19 16:21:29 +02:00
2023-07-19 16:21:26 +02:00
2023-05-11 23:03:28 +09:00
2023-07-19 16:21:20 +02:00
2022-10-08 08:56:37 -07:00
2023-07-19 16:22:09 +02:00
2023-02-09 11:28:04 +01:00
2023-07-19 16:22:15 +02:00
2023-05-11 23:03:31 +09:00
2023-07-19 16:22:03 +02:00
2023-05-24 17:32:41 +01:00
2023-07-19 16:22:10 +02:00
2023-07-19 16:22:00 +02:00
2023-07-19 16:21:24 +02:00
2023-07-19 16:21:08 +02:00
2023-05-24 17:32:37 +01:00
2023-07-19 16:21:58 +02:00
2023-07-19 16:21:58 +02:00
2023-07-19 16:22:09 +02:00
2023-07-19 16:22:16 +02:00
2023-07-23 13:49:27 +02:00
2023-06-28 11:12:36 +02:00
2023-07-23 13:49:24 +02:00
2023-07-05 18:27:37 +01:00
2023-03-10 09:34:20 +01:00
2023-07-23 13:49:27 +02:00
2023-07-19 16:21:57 +02:00
2023-06-21 16:00:51 +02:00
2023-03-10 09:33:01 +01:00
2023-05-24 17:32:42 +01:00
2022-11-09 15:40:32 +01:00
2023-07-19 16:21:41 +02:00
2023-07-19 16:21:00 +02:00
2023-07-19 16:21:58 +02:00
2023-07-23 13:49:30 +02:00
2023-07-23 13:49:24 +02:00
2022-12-31 13:31:56 +01:00
2023-06-21 16:00:52 +02:00
2023-07-19 16:21:00 +02:00
2023-04-06 12:10:44 +02:00
2023-07-19 16:21:59 +02:00
2022-12-31 13:32:00 +01:00
2023-07-19 16:22:14 +02:00
2023-05-24 17:32:53 +01:00
2023-02-01 08:34:05 +01:00
2023-05-11 23:03:16 +09:00
2023-07-19 16:21:59 +02:00
2023-07-19 16:22:06 +02:00
2023-07-23 13:49:21 +02:00
2022-11-09 15:40:14 +01:00
2022-11-10 18:45:40 +01:00
2023-07-19 16:21:33 +02:00
2023-06-28 11:12:38 +02:00
2023-07-19 16:22:03 +02:00
2023-05-11 23:03:31 +09:00
2023-07-19 16:21:54 +02:00
2023-06-28 11:12:35 +02:00
2023-06-14 11:15:28 +02:00
2023-07-19 16:21:01 +02:00
2023-06-21 16:00:56 +02:00
2023-07-19 16:22:17 +02:00
2023-07-23 13:49:21 +02:00
2022-12-31 13:32:38 +01:00
2023-07-19 16:22:12 +02:00
2023-06-14 11:15:32 +02:00
2023-07-19 16:21:41 +02:00
2023-06-28 11:12:40 +02:00
2023-07-19 16:21:26 +02:00
2023-07-19 16:20:55 +02:00
2023-05-11 23:03:31 +09:00
2023-07-19 16:21:48 +02:00
2023-06-09 10:34:07 +02:00
2023-05-30 14:03:32 +01:00