diff mbox series

[v3] gpiolib: acpi: Add a ignore wakeup quirk for Clevo NH5xAx

Message ID 20230214125810.10715-1-wse@tuxedocomputers.com
State Superseded
Headers show
Series [v3] gpiolib: acpi: Add a ignore wakeup quirk for Clevo NH5xAx | expand

Commit Message

Werner Sembach Feb. 14, 2023, 12:58 p.m. UTC
commit 1796f808e4bb ("HID: i2c-hid: acpi: Stop setting wakeup_capable")
changed the policy such that I2C touchpads may be able to wake up the
system by default if the system is configured as such.

However for some devices there is a bug, that is causing the touchpad to
instantly wake up the device again once it gets deactivated. The root cause
is still under investigation:
https://lore.kernel.org/linux-acpi/2d983050-f844-6c5e-8ae9-9f87ac68dfdd@tuxedocomputers.com/T/#mb2e738787f6b6208d17b92aa6e72d4de846d4e4d

To workaround this problem for the time being, introduce a quirk for this
model that will prevent the wakeup capability for being set for GPIO 16.

Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
---
 drivers/gpio/gpiolib-acpi.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Werner Sembach Feb. 14, 2023, 12:59 p.m. UTC | #1
Am 14.02.23 um 13:58 schrieb Werner Sembach:
> commit 1796f808e4bb ("HID: i2c-hid: acpi: Stop setting wakeup_capable")
> changed the policy such that I2C touchpads may be able to wake up the
> system by default if the system is configured as such.
>
> However for some devices there is a bug, that is causing the touchpad to
> instantly wake up the device again once it gets deactivated. The root cause
> is still under investigation:
> https://lore.kernel.org/linux-acpi/2d983050-f844-6c5e-8ae9-9f87ac68dfdd@tuxedocomputers.com/T/#mb2e738787f6b6208d17b92aa6e72d4de846d4e4d
>
> To workaround this problem for the time being, introduce a quirk for this
> model that will prevent the wakeup capability for being set for GPIO 16.
Wrong GPIO number in description of v2 (and v1).
>
> Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
> ---
>   drivers/gpio/gpiolib-acpi.c | 12 ++++++++++++
>   1 file changed, 12 insertions(+)
>
> diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
> index e2ab4d5253bea..82e8e43582eba 100644
> --- a/drivers/gpio/gpiolib-acpi.c
> +++ b/drivers/gpio/gpiolib-acpi.c
> @@ -1612,6 +1612,18 @@ static const struct dmi_system_id gpiolib_acpi_quirks[] __initconst = {
>   			.ignore_wake = "ELAN0415:00@9",
>   		},
>   	},
> +	{
> +		/*
> +		 * Spurious wakeups from TP_ATTN# pin
> +		 * Found in BIOS 1.7.7
> +		 */
> +		.matches = {
> +			DMI_MATCH(DMI_BOARD_NAME, "NH5xAx"),
> +		},
> +		.driver_data = &(struct acpi_gpiolib_dmi_quirk) {
> +			.ignore_wake = "SYNA1202:00@16",
> +		},
> +	},
>   	{} /* Terminating entry */
>   };
>
Andy Shevchenko Feb. 15, 2023, 10:49 a.m. UTC | #2
On Tue, Feb 14, 2023 at 01:58:10PM +0100, Werner Sembach wrote:
> commit 1796f808e4bb ("HID: i2c-hid: acpi: Stop setting wakeup_capable")
> changed the policy such that I2C touchpads may be able to wake up the
> system by default if the system is configured as such.
> 
> However for some devices there is a bug, that is causing the touchpad to
> instantly wake up the device again once it gets deactivated. The root cause
> is still under investigation:
> https://lore.kernel.org/linux-acpi/2d983050-f844-6c5e-8ae9-9f87ac68dfdd@tuxedocomputers.com/T/#mb2e738787f6b6208d17b92aa6e72d4de846d4e4d

Bart, I'm fine if it goes directly via your tree, or I can send it in usual
bundle of fixes after rc1 (however it seems this deserves to make v6.2).

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> To workaround this problem for the time being, introduce a quirk for this
> model that will prevent the wakeup capability for being set for GPIO 16.
> 
> Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
> ---
>  drivers/gpio/gpiolib-acpi.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
> index e2ab4d5253bea..82e8e43582eba 100644
> --- a/drivers/gpio/gpiolib-acpi.c
> +++ b/drivers/gpio/gpiolib-acpi.c
> @@ -1612,6 +1612,18 @@ static const struct dmi_system_id gpiolib_acpi_quirks[] __initconst = {
>  			.ignore_wake = "ELAN0415:00@9",
>  		},
>  	},
> +	{
> +		/*
> +		 * Spurious wakeups from TP_ATTN# pin
> +		 * Found in BIOS 1.7.7
> +		 */
> +		.matches = {
> +			DMI_MATCH(DMI_BOARD_NAME, "NH5xAx"),
> +		},
> +		.driver_data = &(struct acpi_gpiolib_dmi_quirk) {
> +			.ignore_wake = "SYNA1202:00@16",
> +		},
> +	},
>  	{} /* Terminating entry */
>  };
>  
> -- 
> 2.34.1
>
Werner Sembach Feb. 15, 2023, 11:59 a.m. UTC | #3
Am 15.02.23 um 11:49 schrieb Andy Shevchenko:
> On Tue, Feb 14, 2023 at 01:58:10PM +0100, Werner Sembach wrote:
>> commit 1796f808e4bb ("HID: i2c-hid: acpi: Stop setting wakeup_capable")
>> changed the policy such that I2C touchpads may be able to wake up the
>> system by default if the system is configured as such.
>>
>> However for some devices there is a bug, that is causing the touchpad to
>> instantly wake up the device again once it gets deactivated. The root cause
>> is still under investigation:
>> https://lore.kernel.org/linux-acpi/2d983050-f844-6c5e-8ae9-9f87ac68dfdd@tuxedocomputers.com/T/#mb2e738787f6b6208d17b92aa6e72d4de846d4e4d
> Bart, I'm fine if it goes directly via your tree, or I can send it in usual
> bundle of fixes after rc1 (however it seems this deserves to make v6.2).
Just realized i did not add cc stable:

It is required for 6.1 also.
>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>
>> To workaround this problem for the time being, introduce a quirk for this
>> model that will prevent the wakeup capability for being set for GPIO 16.
>>
>> Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
>> ---
>>   drivers/gpio/gpiolib-acpi.c | 12 ++++++++++++
>>   1 file changed, 12 insertions(+)
>>
>> diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
>> index e2ab4d5253bea..82e8e43582eba 100644
>> --- a/drivers/gpio/gpiolib-acpi.c
>> +++ b/drivers/gpio/gpiolib-acpi.c
>> @@ -1612,6 +1612,18 @@ static const struct dmi_system_id gpiolib_acpi_quirks[] __initconst = {
>>   			.ignore_wake = "ELAN0415:00@9",
>>   		},
>>   	},
>> +	{
>> +		/*
>> +		 * Spurious wakeups from TP_ATTN# pin
>> +		 * Found in BIOS 1.7.7
>> +		 */
>> +		.matches = {
>> +			DMI_MATCH(DMI_BOARD_NAME, "NH5xAx"),
>> +		},
>> +		.driver_data = &(struct acpi_gpiolib_dmi_quirk) {
>> +			.ignore_wake = "SYNA1202:00@16",
>> +		},
>> +	},
>>   	{} /* Terminating entry */
>>   };
>>   
>> -- 
>> 2.34.1
>>
Andy Shevchenko Feb. 15, 2023, 1:26 p.m. UTC | #4
On Wed, Feb 15, 2023 at 12:59:46PM +0100, Werner Sembach wrote:
> Am 15.02.23 um 11:49 schrieb Andy Shevchenko:
> > On Tue, Feb 14, 2023 at 01:58:10PM +0100, Werner Sembach wrote:
> > > commit 1796f808e4bb ("HID: i2c-hid: acpi: Stop setting wakeup_capable")
> > > changed the policy such that I2C touchpads may be able to wake up the
> > > system by default if the system is configured as such.
> > > 
> > > However for some devices there is a bug, that is causing the touchpad to
> > > instantly wake up the device again once it gets deactivated. The root cause
> > > is still under investigation:
> > > https://lore.kernel.org/linux-acpi/2d983050-f844-6c5e-8ae9-9f87ac68dfdd@tuxedocomputers.com/T/#mb2e738787f6b6208d17b92aa6e72d4de846d4e4d
> > Bart, I'm fine if it goes directly via your tree, or I can send it in usual
> > bundle of fixes after rc1 (however it seems this deserves to make v6.2).
> Just realized i did not add cc stable:
> 
> It is required for 6.1 also.

We have at least the following options:
- you can send specific request for stable after it becomes a part of upstream
- you can send a v4 with it

> > Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > 
> > > To workaround this problem for the time being, introduce a quirk for this
> > > model that will prevent the wakeup capability for being set for GPIO 16.
Andy Shevchenko Feb. 15, 2023, 1:28 p.m. UTC | #5
On Wed, Feb 15, 2023 at 03:26:36PM +0200, Andy Shevchenko wrote:
> On Wed, Feb 15, 2023 at 12:59:46PM +0100, Werner Sembach wrote:
> > Am 15.02.23 um 11:49 schrieb Andy Shevchenko:
> > > On Tue, Feb 14, 2023 at 01:58:10PM +0100, Werner Sembach wrote:
> > > > commit 1796f808e4bb ("HID: i2c-hid: acpi: Stop setting wakeup_capable")
> > > > changed the policy such that I2C touchpads may be able to wake up the
> > > > system by default if the system is configured as such.
> > > > 
> > > > However for some devices there is a bug, that is causing the touchpad to
> > > > instantly wake up the device again once it gets deactivated. The root cause
> > > > is still under investigation:
> > > > https://lore.kernel.org/linux-acpi/2d983050-f844-6c5e-8ae9-9f87ac68dfdd@tuxedocomputers.com/T/#mb2e738787f6b6208d17b92aa6e72d4de846d4e4d
> > > Bart, I'm fine if it goes directly via your tree, or I can send it in usual
> > > bundle of fixes after rc1 (however it seems this deserves to make v6.2).

Actually we have yet another little fix. So maybe I can create a tagged bundle.
Perhaps v4 will be the best option here.

> > Just realized i did not add cc stable:
> > 
> > It is required for 6.1 also.
> 
> We have at least the following options:
> - you can send specific request for stable after it becomes a part of upstream
> - you can send a v4 with it
> 
> > > Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > > 
> > > > To workaround this problem for the time being, introduce a quirk for this
> > > > model that will prevent the wakeup capability for being set for GPIO 16.
Werner Sembach Feb. 15, 2023, 2:37 p.m. UTC | #6
Am 15.02.23 um 14:28 schrieb Andy Shevchenko:
> On Wed, Feb 15, 2023 at 03:26:36PM +0200, Andy Shevchenko wrote:
>> On Wed, Feb 15, 2023 at 12:59:46PM +0100, Werner Sembach wrote:
>>> Am 15.02.23 um 11:49 schrieb Andy Shevchenko:
>>>> On Tue, Feb 14, 2023 at 01:58:10PM +0100, Werner Sembach wrote:
>>>>> commit 1796f808e4bb ("HID: i2c-hid: acpi: Stop setting wakeup_capable")
>>>>> changed the policy such that I2C touchpads may be able to wake up the
>>>>> system by default if the system is configured as such.
>>>>>
>>>>> However for some devices there is a bug, that is causing the touchpad to
>>>>> instantly wake up the device again once it gets deactivated. The root cause
>>>>> is still under investigation:
>>>>> https://lore.kernel.org/linux-acpi/2d983050-f844-6c5e-8ae9-9f87ac68dfdd@tuxedocomputers.com/T/#mb2e738787f6b6208d17b92aa6e72d4de846d4e4d
>>>> Bart, I'm fine if it goes directly via your tree, or I can send it in usual
>>>> bundle of fixes after rc1 (however it seems this deserves to make v6.2).
> Actually we have yet another little fix. So maybe I can create a tagged bundle.
> Perhaps v4 will be the best option here.
on it
>
>>> Just realized i did not add cc stable:
>>>
>>> It is required for 6.1 also.
>> We have at least the following options:
>> - you can send specific request for stable after it becomes a part of upstream
>> - you can send a v4 with it
>>
>>>> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>>>>
>>>>> To workaround this problem for the time being, introduce a quirk for this
>>>>> model that will prevent the wakeup capability for being set for GPIO 16.
diff mbox series

Patch

diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
index e2ab4d5253bea..82e8e43582eba 100644
--- a/drivers/gpio/gpiolib-acpi.c
+++ b/drivers/gpio/gpiolib-acpi.c
@@ -1612,6 +1612,18 @@  static const struct dmi_system_id gpiolib_acpi_quirks[] __initconst = {
 			.ignore_wake = "ELAN0415:00@9",
 		},
 	},
+	{
+		/*
+		 * Spurious wakeups from TP_ATTN# pin
+		 * Found in BIOS 1.7.7
+		 */
+		.matches = {
+			DMI_MATCH(DMI_BOARD_NAME, "NH5xAx"),
+		},
+		.driver_data = &(struct acpi_gpiolib_dmi_quirk) {
+			.ignore_wake = "SYNA1202:00@16",
+		},
+	},
 	{} /* Terminating entry */
 };