[PATCH] ACPI: resource: Add IRQ override for MECHREV Jiaolong17KS

From: Li Chen
Date: Fri Jun 30 2023 - 08:36:30 EST


Fix a regression introduced by commit 9946e39fe8d0 ("ACPI: resource: skip
IRQ override on AMD Zen platforms") on MECHREV Jiaolong17KS, which
causes the built-in keyboard to not work. This restores the functionality
by adding an IRQ override.

I have personally tested this on the 17" model but I'm not sure if this
issue is present on the 16 model.

Fixes: 9946e39fe8d0 ("ACPI: resource: skip IRQ override on AMD Zen platforms")
Signed-off-by: Li Chen <me@linux.beauty>
---
drivers/acpi/resource.c | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c
index 0800a9d77558..5b00ee90388a 100644
--- a/drivers/acpi/resource.c
+++ b/drivers/acpi/resource.c
@@ -527,6 +527,17 @@ static const struct dmi_system_id lg_laptop[] = {
{ }
};

+static const struct dmi_system_id mechrev_laptop[] = {
+ {
+ .ident = "Jiaolong17KS Series GM7XG0M",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "MECHREVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Jiaolong17KS Series GM7XG0M"),
+ },
+ },
+ { }
+};
+
struct irq_override_cmp {
const struct dmi_system_id *system;
unsigned char irq;
@@ -544,6 +555,7 @@ static const struct irq_override_cmp override_table[] = {
{ tongfang_gm_rg, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1, true },
{ maingear_laptop, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1, true },
{ lg_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, false },
+ { mechrev_laptop, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1, true },
};

static bool acpi_dev_irq_override(u32 gsi, u8 triggering, u8 polarity,
--
2.41.0