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 <[email protected]>
Reported-by: Nathan Schulte <[email protected]>
Reported-by: Friedrich Vock <[email protected]>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217336
Reported-by: [email protected]
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217493
Link: https://lore.kernel.org/linux-input/[email protected]/
Fixes: 2956b5d94a76b ("pinctrl / gpio: Introduce .set_config() callback for GPIO chips")
Signed-off-by: Mario Limonciello <[email protected]>
---
drivers/pinctrl/pinctrl-amd.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c
index a22e02e2f5d35..76fabf4404a6c 100644
--- a/drivers/pinctrl/pinctrl-amd.c
+++ b/drivers/pinctrl/pinctrl-amd.c
@@ -852,9 +852,6 @@ static int amd_gpio_set_config(struct gpio_chip *gc, unsigned pin,
{
struct amd_gpio *gpio_dev = gpiochip_get_data(gc);
- if (pinconf_to_config_param(config) != PIN_CONFIG_INPUT_DEBOUNCE)
- return -ENOTSUPP;
-
return amd_pinconf_set(gpio_dev->pctrl, pin, &config, 1);
}
--
2.34.1
Fri, Jun 30, 2023 at 02:47:16PM -0500, Mario Limonciello kirjoitti:
> 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
> }
I beleive we do not need so many heading spaces in the above
> ```
>
> 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`.
...
> Fixes: 2956b5d94a76b ("pinctrl / gpio: Introduce .set_config() callback for GPIO chips")
Can you group fixes at the beginning of the series?
--
With Best Regards,
Andy Shevchenko
On 7/3/23 16:35, [email protected] wrote:
> Fri, Jun 30, 2023 at 02:47:16PM -0500, Mario Limonciello kirjoitti:
>> 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
>> }
>
> I beleive we do not need so many heading spaces in the above
>
OK, will fix it up.
>> ```
>>
>> 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`.
>
> ...
>
>> Fixes: 2956b5d94a76b ("pinctrl / gpio: Introduce .set_config() callback for GPIO chips")
>
> Can you group fixes at the beginning of the series?
>
I'm a bit wary of this because the other commits fix it so that debounce
handling works properly before this is wired up. If I put this patch
earlier I'll need to make sure it's only used for the new options and
not debounce.
But I'll think about how to do it.