initial attempt at gpd win max 2 patches

This commit is contained in:
Nicholas Ricciuti 2023-05-13 19:47:43 -04:00
parent 96626a65ba
commit ff4b46bb5d
No known key found for this signature in database
GPG key ID: A82FCE39A3723CDF
2 changed files with 49 additions and 0 deletions

View file

@ -0,0 +1,37 @@
diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c
index 510cdec375c4..c2d494784425 100644
--- a/drivers/acpi/resource.c
+++ b/drivers/acpi/resource.c
@@ -416,16 +416,19 @@ static bool acpi_dev_irq_override(u32 gsi, u8 triggering, u8 polarity,
{
int i;
+ static const struct dmi_system_id gpd_systems[] = {
+ {
+ .ident = "GPD Win Max 2",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "GPD"),
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "G1619-04"),
+ },
+ },
+ {}
+ };
+
+#ifdef CONFIG_X86
/*
- * IRQ override isn't needed on modern AMD Zen systems and
- * this override breaks active low IRQs on AMD Ryzen 6000 and
- * newer systems. Skip it.
- */
- if (boot_cpu_has(X86_FEATURE_ZEN))
- return false;
+ * Skip IRQ override for GPD Win Max 2 and AMD Zen systems.
+ */
+ if (dmi_check_system(gpd_systems) || boot_cpu_has(X86_FEATURE_ZEN))
+ return false;
#endif
for (i = 0; i < ARRAY_SIZE(skip_override_table); i++) {
const struct irq_override_cmp *entry = &skip_override_table[i];
}
}

View file

@ -0,0 +1,12 @@
diff --git a/drivers/iio/imu/bmi160/bmi160_i2c.c b/drivers/iio/imu/bmi160/bmi160_i2c.c
index 26398614eddfa..2b3e3e15e2e04 100644
--- a/drivers/iio/imu/bmi160/bmi160_i2c.c
+++ b/drivers/iio/imu/bmi160/bmi160_i2c.c
@@ -43,6 +43,7 @@ MODULE_DEVICE_TABLE(i2c, bmi160_i2c_id);
static const struct acpi_device_id bmi160_acpi_match[] = {
{"BMI0160", 0},
+ {"10EC5280", 0}, /* GPD Win Max 2 */
{ },
};
MODULE_DEVICE_TABLE(acpi, bmi160_acpi_match);