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
..
2021-12-16 04:18:30 +01:00
2023-02-14 19:11:50 +01:00
2023-07-19 16:21:34 +02:00
2022-09-05 14:10:14 +02:00
2021-12-22 03:09:56 +01:00
2022-09-08 10:06:57 +02:00
2023-07-19 16:21:36 +02:00
2023-03-10 09:33:16 +01:00
2023-06-14 11:15:28 +02:00
2022-08-22 10:46:25 +02:00
2022-09-19 09:35:57 +02:00
2023-07-19 16:21:37 +02:00
2022-01-24 01:12:54 +01:00
2023-05-11 23:03:02 +09:00
2023-05-11 23:03:36 +09:00
2023-05-11 23:03:36 +09:00
2022-08-16 12:23:30 +03:00
2021-12-16 04:18:30 +01:00
2021-01-18 14:41:42 +01:00
2022-10-04 10:47:48 +02:00
2023-03-10 09:33:11 +01:00
2023-07-19 16:21:37 +02:00
2022-10-11 10:59:59 -07:00
2022-05-04 23:40:05 +02:00
2021-04-08 15:57:14 +02:00
2022-02-11 01:37:21 +01:00
2021-02-15 11:43:26 +01:00
2021-12-16 04:18:30 +01:00
2022-07-18 11:38:37 +02:00
2019-12-30 14:27:17 +01:00
2022-11-10 12:26:18 +01:00
2019-10-04 23:26:23 +02:00
2022-10-11 10:59:59 -07:00
2022-10-04 10:42:11 +02:00
2022-12-31 13:32:16 +01:00
2021-03-10 14:41:58 +01:00
2019-05-30 11:29:22 -07:00
2023-07-23 13:49:30 +02:00
2023-07-23 13:49:30 +02:00
2022-05-25 09:37:44 +02:00
2020-01-07 13:57:17 +01:00
2022-06-10 14:51:36 +02:00
2023-07-19 16:21:38 +02:00
2023-03-10 09:33:59 +01:00
2019-05-30 11:26:32 -07:00
2022-06-30 14:05:57 +02:00
2020-07-16 15:13:55 +02:00
2022-09-20 11:22:12 +02:00
2019-11-05 15:33:40 +01:00
2021-12-22 03:09:56 +01:00
2021-12-16 04:18:30 +01:00
2022-05-09 13:46:51 +02:00
2022-05-09 13:46:51 +02:00
2020-12-04 09:17:51 +01:00
2021-10-14 01:22:58 +02:00
2022-10-17 11:47:38 +02:00
2022-12-31 13:32:14 +01:00
2021-12-22 02:57:27 +01:00
2020-04-28 13:26:49 +02:00
2019-06-05 17:37:06 +02:00
2021-04-22 02:03:01 +02:00
2022-04-22 22:56:46 +02:00
2020-04-16 14:21:23 +02:00
2020-11-05 11:30:31 +01:00
2022-09-03 00:17:35 +02:00
2021-06-12 01:58:10 +02:00
2023-07-19 16:21:38 +02:00
2023-04-06 12:10:49 +02:00
2021-12-16 04:18:30 +01:00
2022-06-10 14:51:36 +02:00
2021-12-16 04:18:30 +01:00
2019-06-05 17:37:18 +02:00
2022-09-08 15:18:58 +02:00
2021-12-22 03:09:56 +01:00
2023-03-10 09:33:11 +01:00
2022-08-22 09:51:08 +02:00
2023-02-14 19:11:50 +01:00
2022-10-04 09:58:17 +02:00
2021-12-16 04:18:30 +01:00
2021-12-16 04:18:30 +01:00
2019-11-05 15:33:40 +01:00
2022-12-31 13:32:23 +01:00
2022-06-10 14:51:36 +02:00
2022-06-10 14:51:36 +02:00
2021-12-16 04:18:30 +01:00
2022-03-15 01:46:13 +01:00
2022-10-18 09:50:29 +02:00
2021-12-22 02:57:27 +01:00
2021-12-22 02:57:27 +01:00