Skip to contentSkip to conversation

ACPI: resource: Add a quirk for Lenovo Yoga 7 14ARB7

PATCH In review Mario Limonciello 3 participants 3 messages Jul 28, 2023 – Jul 31, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ACPI: resource: Add a quirk for Lenovo Yoga 7 14ARB7

Lenovo Yoga 7 needs to have keyboard interrupt signaling polarity is incorrect in the MADT and the value from the DSDT should be used.

Fixes a9c4a912b7dc ("ACPI: resource: Remove "Zen" specific match and quirks")

---
v1->v2:
* Level->edge

---
 drivers/acpi/resource.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
drivers/acpi/resource.c +12 -0
index 1dd8d5aebf678..6ff788223f332 100644
@@ -481,6 +481,17 @@ static const struct dmi_system_id lg_laptop[] = {
 	{ }
 };
 
+static const struct dmi_system_id lenovo_laptop[] = {
+	{
+		.ident = "Lenovo Yoga 7 14ARB7",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "82QF"),
+		},
+	},
+	{ }
+};
+
 struct irq_override_cmp {
 	const struct dmi_system_id *system;
 	unsigned char irq;
@@ -494,6 +505,7 @@ static const struct irq_override_cmp override_table[] = {
 	{ medion_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, false },
 	{ asus_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, false },
 	{ lg_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, false },
+	{ lenovo_laptop, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1, false}
 };
 
 static bool acpi_dev_irq_override(u32 gsi, u8 triggering, u8 polarity,
Signature · 1 line
2.34.1
Tested-by on v2 1/1
#1 lore raw
Quoted 7 lines · Mario Limonciello

Lenovo Yoga 7 needs to have keyboard interrupt signaling polarity is incorrect in the MADT and the value from the DSDT should be used.

Fixes a9c4a912b7dc ("ACPI: resource: Remove "Zen" specific match and quirks")

Thanks!

#2 lore raw
In reply to Mario Limonciello

Would it be possible to include a similar quirk for the Lenovo ThinkBook 13s G4 ARB?

a9c4a912b7dc ("ACPI: resource: Remove "Zen" specific match and quirks") doesn't break the keyboard on this model, but makes it very sluggish and unresponsive.

Adding the following entry fixes the issue for me:

static const struct dmi_system_id lenovo_laptop[] = {
	{
		.ident = "Lenovo Yoga 7 14ARB7",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
			DMI_MATCH(DMI_PRODUCT_NAME, "82QF"),
		},
	},
			DMI_MATCH(DMI_PRODUCT_NAME, "82QF"),
		},
	},

+ {
+ .ident = "Lenovo ThinkBook 13s G4 ARB",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21AS"),
+ },
+ },

	{ }
};