ACPI fixes for 6.15-rc2

- Add suspend-to-idle EC wakeup quirks for Lenovo Go S (Mario
    Limonciello).
 
  - Prevent ACPI button from sending spurions KEY_POWER events to user
    space in some cases after a recent update (Mario Limonciello).
 
  - Compute the size of a structure instead of the size of a pointer
    in two places in the PPTT parser code (Jean-Marc Eurin).
 -----BEGIN PGP SIGNATURE-----
 
 iQFGBAABCAAwFiEEcM8Aw/RY0dgsiRUR7l+9nS/U47UFAmf5IDESHHJqd0Byand5
 c29ja2kubmV0AAoJEO5fvZ0v1OO18iAIAI7esmVtUp4iiW5PY3FPiVepsYyXuAcI
 kyvy0Xw7WF+05bzdwojWDUAWay/DqUMqOgKZfoQnymXetosAXlkPkZBfWQkygJe7
 8Jt38OgKlu4iDLTd+Nh2aDQm+5q5VkN2F6whkltlndjjxgCkaVEguJUyXXBuRwoH
 o0uzt6GCk6w7t+RXnWexP4+hQ1Krfjq5OasgCaScABE0DkAEWDJVZecgod9Eq8ST
 myJWaOzs1UbuYZeZk+p7fAS4IHacH/ArZxhl2gaPtSk54flZlopvV7rFWJGJO0eY
 Q4pyg3zK2ZbIrtq+3wxOPIX1KMj22VV9XIBftV4sn1TleA28sfMoS40=
 =SnIs
 -----END PGP SIGNATURE-----

Merge tag 'acpi-6.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI fixes from Rafael Wysocki:
 "These fix a recent regression in the ACPI button driver, add quirks
  related to EC wakeups from suspend-to-idle and fix coding mistakes
  related to the usage of sizeof() in the PPTT parser code:

  Summary:

   - Add suspend-to-idle EC wakeup quirks for Lenovo Go S (Mario
     Limonciello)

   - Prevent ACPI button from sending spurions KEY_POWER events to user
     space in some cases after a recent update (Mario Limonciello)

   - Compute the size of a structure instead of the size of a pointer in
     two places in the PPTT parser code (Jean-Marc Eurin)"

* tag 'acpi-6.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI PPTT: Fix coding mistakes in a couple of sizeof() calls
  ACPI: EC: Set ec_no_wakeup for Lenovo Go S
  ACPI: button: Only send `KEY_POWER` for `ACPI_BUTTON_NOTIFY_STATUS`
This commit is contained in:
Linus Torvalds 2025-04-11 08:21:19 -07:00
commit c86e5b561a
3 changed files with 31 additions and 3 deletions

View File

@ -458,7 +458,7 @@ static void acpi_button_notify(acpi_handle handle, u32 event, void *data)
acpi_pm_wakeup_event(&device->dev);
button = acpi_driver_data(device);
if (button->suspended)
if (button->suspended || event == ACPI_BUTTON_NOTIFY_WAKE)
return;
input = button->input;

View File

@ -2301,6 +2301,34 @@ static const struct dmi_system_id acpi_ec_no_wakeup[] = {
DMI_MATCH(DMI_PRODUCT_FAMILY, "103C_5336AN HP ZHAN 66 Pro"),
},
},
/*
* Lenovo Legion Go S; touchscreen blocks HW sleep when woken up from EC
* https://gitlab.freedesktop.org/drm/amd/-/issues/3929
*/
{
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
DMI_MATCH(DMI_PRODUCT_NAME, "83L3"),
}
},
{
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
DMI_MATCH(DMI_PRODUCT_NAME, "83N6"),
}
},
{
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
DMI_MATCH(DMI_PRODUCT_NAME, "83Q2"),
}
},
{
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
DMI_MATCH(DMI_PRODUCT_NAME, "83Q3"),
}
},
{ },
};

View File

@ -229,7 +229,7 @@ static int acpi_pptt_leaf_node(struct acpi_table_header *table_hdr,
node_entry = ACPI_PTR_DIFF(node, table_hdr);
entry = ACPI_ADD_PTR(struct acpi_subtable_header, table_hdr,
sizeof(struct acpi_table_pptt));
proc_sz = sizeof(struct acpi_pptt_processor *);
proc_sz = sizeof(struct acpi_pptt_processor);
while ((unsigned long)entry + proc_sz < table_end) {
cpu_node = (struct acpi_pptt_processor *)entry;
@ -270,7 +270,7 @@ static struct acpi_pptt_processor *acpi_find_processor_node(struct acpi_table_he
table_end = (unsigned long)table_hdr + table_hdr->length;
entry = ACPI_ADD_PTR(struct acpi_subtable_header, table_hdr,
sizeof(struct acpi_table_pptt));
proc_sz = sizeof(struct acpi_pptt_processor *);
proc_sz = sizeof(struct acpi_pptt_processor);
/* find the processor structure associated with this cpuid */
while ((unsigned long)entry + proc_sz < table_end) {