Commit 475c9f58 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull ACPI fixes from Rafael Wysocki:
 "Add two more ACPI IRQ override quirks and update the code using them
  to avoid unnecessary overhead (Hans de Goede)"

* tag 'acpi-6.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI: resource: acpi_dev_irq_override(): Check DMI match last
  ACPI: resource: Add TongFang GM5HG0A to irq1_edge_low_force_override[]
  ACPI: resource: Add Asus Vivobook X1504VAP to irq1_level_low_skip_override[]
parents e0daef7d cd4a7b2e
Loading
Loading
Loading
Loading
+21 −3
Original line number Diff line number Diff line
@@ -440,6 +440,13 @@ static const struct dmi_system_id irq1_level_low_skip_override[] = {
			DMI_MATCH(DMI_BOARD_NAME, "S5602ZA"),
		},
	},
	{
		/* Asus Vivobook X1504VAP */
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_BOARD_NAME, "X1504VAP"),
		},
	},
	{
		/* Asus Vivobook X1704VAP */
		.matches = {
@@ -646,6 +653,17 @@ static const struct dmi_system_id irq1_edge_low_force_override[] = {
			DMI_MATCH(DMI_BOARD_NAME, "GMxHGxx"),
		},
	},
	{
		/*
		 * TongFang GM5HG0A in case of the SKIKK Vanaheim relabel the
		 * board-name is changed, so check OEM strings instead. Note
		 * OEM string matches are always exact matches.
		 * https://bugzilla.kernel.org/show_bug.cgi?id=219614
		 */
		.matches = {
			DMI_EXACT_MATCH(DMI_OEM_STRING, "GM5HG0A"),
		},
	},
	{ }
};

@@ -671,11 +689,11 @@ static bool acpi_dev_irq_override(u32 gsi, u8 triggering, u8 polarity,
	for (i = 0; i < ARRAY_SIZE(override_table); i++) {
		const struct irq_override_cmp *entry = &override_table[i];

		if (dmi_check_system(entry->system) &&
		    entry->irq == gsi &&
		if (entry->irq == gsi &&
		    entry->triggering == triggering &&
		    entry->polarity == polarity &&
		    entry->shareable == shareable)
		    entry->shareable == shareable &&
		    dmi_check_system(entry->system))
			return entry->override;
	}