linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ACPI: Skip IRQ override on Asus Vivobook K3402ZA/K3502ZA
@ 2022-08-29  3:04 Tamim Khan
  2022-09-03 18:46 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Tamim Khan @ 2022-08-29  3:04 UTC (permalink / raw)
  To: linux-acpi; +Cc: lenb, rafael, linux-kernel, Tamim Khan, Hui Wang, Sunand

In the ACPI DSDT table for Asus VivoBook K3402ZA/K3502ZA
IRQ 1 is described as ActiveLow; however, the kernel overrides
it to Edge_High. This prevents the internal keyboard from working
on these laptops. In order to fix this add these laptops to the
skip_override_table so that the kernel does not override IRQ 1 to
Edge_High.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=216158
Reviewed-by: Hui Wang <hui.wang@canonical.com>
Tested-by: Tamim Khan <tamim@fusetak.com>
Tested-by: Sunand <sunandchakradhar@gmail.com>
Signed-off-by: Tamim Khan <tamim@fusetak.com>
---
This patch is very similar to the fix implemented for keyboards on 
Medion laptops in 892a012699fc0b91a2ed6309078936191447f480 
(ACPI: resources: Add DMI-based legacy IRQ override quirk) and 
1b26ae40092b43bb6e9c5df376227382b390b953 (ACPI: resources: Add one 
more Medion model in IRQ override quirk) and has been reviewed by the
author of those commits. It has also been tested by myself on a K3502ZA 
and by someone else with a K3402ZA to verify that this patch allows
the internal keyboard to work.

 drivers/acpi/resource.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c
index 510cdec375c4..2ebc85233bac 100644
--- a/drivers/acpi/resource.c
+++ b/drivers/acpi/resource.c
@@ -399,6 +399,24 @@ static const struct dmi_system_id medion_laptop[] = {
 	{ }
 };
 
+static const struct dmi_system_id asus_laptop[] = {
+	{
+		.ident = "Asus Vivobook K3402ZA",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+			DMI_MATCH(DMI_BOARD_NAME, "K3402ZA"),
+		},
+	},
+	{
+		.ident = "Asus Vivobook K3502ZA",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+			DMI_MATCH(DMI_BOARD_NAME, "K3502ZA"),
+		},
+	},
+	{ }
+};
+
 struct irq_override_cmp {
 	const struct dmi_system_id *system;
 	unsigned char irq;
@@ -409,6 +427,7 @@ struct irq_override_cmp {
 
 static const struct irq_override_cmp skip_override_table[] = {
 	{ medion_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0 },
+	{ asus_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0 },
 };
 
 static bool acpi_dev_irq_override(u32 gsi, u8 triggering, u8 polarity,
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ACPI: Skip IRQ override on Asus Vivobook K3402ZA/K3502ZA
  2022-08-29  3:04 [PATCH] ACPI: Skip IRQ override on Asus Vivobook K3402ZA/K3502ZA Tamim Khan
@ 2022-09-03 18:46 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2022-09-03 18:46 UTC (permalink / raw)
  To: Tamim Khan
  Cc: ACPI Devel Maling List, Len Brown, Rafael J. Wysocki,
	Linux Kernel Mailing List, Hui Wang, Sunand

On Mon, Aug 29, 2022 at 5:08 AM Tamim Khan <tamim@fusetak.com> wrote:
>
> In the ACPI DSDT table for Asus VivoBook K3402ZA/K3502ZA
> IRQ 1 is described as ActiveLow; however, the kernel overrides
> it to Edge_High. This prevents the internal keyboard from working
> on these laptops. In order to fix this add these laptops to the
> skip_override_table so that the kernel does not override IRQ 1 to
> Edge_High.
>
> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=216158
> Reviewed-by: Hui Wang <hui.wang@canonical.com>
> Tested-by: Tamim Khan <tamim@fusetak.com>
> Tested-by: Sunand <sunandchakradhar@gmail.com>
> Signed-off-by: Tamim Khan <tamim@fusetak.com>
> ---
> This patch is very similar to the fix implemented for keyboards on
> Medion laptops in 892a012699fc0b91a2ed6309078936191447f480
> (ACPI: resources: Add DMI-based legacy IRQ override quirk) and
> 1b26ae40092b43bb6e9c5df376227382b390b953 (ACPI: resources: Add one
> more Medion model in IRQ override quirk) and has been reviewed by the
> author of those commits. It has also been tested by myself on a K3502ZA
> and by someone else with a K3402ZA to verify that this patch allows
> the internal keyboard to work.
>
>  drivers/acpi/resource.c | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
>
> diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c
> index 510cdec375c4..2ebc85233bac 100644
> --- a/drivers/acpi/resource.c
> +++ b/drivers/acpi/resource.c
> @@ -399,6 +399,24 @@ static const struct dmi_system_id medion_laptop[] = {
>         { }
>  };
>
> +static const struct dmi_system_id asus_laptop[] = {
> +       {
> +               .ident = "Asus Vivobook K3402ZA",
> +               .matches = {
> +                       DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
> +                       DMI_MATCH(DMI_BOARD_NAME, "K3402ZA"),
> +               },
> +       },
> +       {
> +               .ident = "Asus Vivobook K3502ZA",
> +               .matches = {
> +                       DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
> +                       DMI_MATCH(DMI_BOARD_NAME, "K3502ZA"),
> +               },
> +       },
> +       { }
> +};
> +
>  struct irq_override_cmp {
>         const struct dmi_system_id *system;
>         unsigned char irq;
> @@ -409,6 +427,7 @@ struct irq_override_cmp {
>
>  static const struct irq_override_cmp skip_override_table[] = {
>         { medion_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0 },
> +       { asus_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0 },
>  };
>
>  static bool acpi_dev_irq_override(u32 gsi, u8 triggering, u8 polarity,
> --

Applied as 6.1 material, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-03 18:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-29  3:04 [PATCH] ACPI: Skip IRQ override on Asus Vivobook K3402ZA/K3502ZA Tamim Khan
2022-09-03 18:46 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).