@@ -385,7 +385,12 @@ unsigned int acpi_dev_get_irq_type(int triggering, int polarity)
385385}
386386EXPORT_SYMBOL_GPL (acpi_dev_get_irq_type );
387387
388- static const struct dmi_system_id medion_laptop [] = {
388+ /*
389+ * DMI matches for boards where the DSDT specifies the kbd IRQ as
390+ * level active-low and using the override changes this to rising edge,
391+ * stopping the keyboard from working.
392+ */
393+ static const struct dmi_system_id irq1_level_low_skip_override [] = {
389394 {
390395 .ident = "MEDION P15651" ,
391396 .matches = {
@@ -407,10 +412,6 @@ static const struct dmi_system_id medion_laptop[] = {
407412 DMI_MATCH (DMI_BOARD_NAME , "M1xA" ),
408413 },
409414 },
410- { }
411- };
412-
413- static const struct dmi_system_id asus_laptop [] = {
414415 {
415416 .ident = "Asus Vivobook K3402ZA" ,
416417 .matches = {
@@ -474,20 +475,28 @@ static const struct dmi_system_id asus_laptop[] = {
474475 DMI_MATCH (DMI_BOARD_NAME , "B2502CBA" ),
475476 },
476477 },
478+ {
479+ .ident = "LG Electronics 17U70P" ,
480+ .matches = {
481+ DMI_MATCH (DMI_SYS_VENDOR , "LG Electronics" ),
482+ DMI_MATCH (DMI_BOARD_NAME , "17U70P" ),
483+ },
484+ },
477485 { }
478486};
479487
480- static const struct dmi_system_id tongfang_gm_rg [] = {
488+ /*
489+ * DMI matches for AMD Zen boards where the DSDT specifies the kbd IRQ
490+ * as falling edge and this must be overridden to rising edge,
491+ * to have a working keyboard.
492+ */
493+ static const struct dmi_system_id irq1_edge_low_force_override [] = {
481494 {
482495 .ident = "TongFang GMxRGxx/XMG CORE 15 (M22)/TUXEDO Stellaris 15 Gen4 AMD" ,
483496 .matches = {
484497 DMI_MATCH (DMI_BOARD_NAME , "GMxRGxx" ),
485498 },
486499 },
487- { }
488- };
489-
490- static const struct dmi_system_id maingear_laptop [] = {
491500 {
492501 .ident = "MAINGEAR Vector Pro 2 15" ,
493502 .matches = {
@@ -502,10 +511,6 @@ static const struct dmi_system_id maingear_laptop[] = {
502511 DMI_MATCH (DMI_PRODUCT_NAME , "MG-VCP2-17A3070T" ),
503512 },
504513 },
505- { }
506- };
507-
508- static const struct dmi_system_id pcspecialist_laptop [] = {
509514 {
510515 .ident = "PCSpecialist Elimina Pro 16 M" ,
511516 /*
@@ -520,17 +525,6 @@ static const struct dmi_system_id pcspecialist_laptop[] = {
520525 { }
521526};
522527
523- static const struct dmi_system_id lg_laptop [] = {
524- {
525- .ident = "LG Electronics 17U70P" ,
526- .matches = {
527- DMI_MATCH (DMI_SYS_VENDOR , "LG Electronics" ),
528- DMI_MATCH (DMI_BOARD_NAME , "17U70P" ),
529- },
530- },
531- { }
532- };
533-
534528struct irq_override_cmp {
535529 const struct dmi_system_id * system ;
536530 unsigned char irq ;
@@ -541,12 +535,8 @@ struct irq_override_cmp {
541535};
542536
543537static const struct irq_override_cmp override_table [] = {
544- { medion_laptop , 1 , ACPI_LEVEL_SENSITIVE , ACPI_ACTIVE_LOW , 0 , false },
545- { asus_laptop , 1 , ACPI_LEVEL_SENSITIVE , ACPI_ACTIVE_LOW , 0 , false },
546- { tongfang_gm_rg , 1 , ACPI_EDGE_SENSITIVE , ACPI_ACTIVE_LOW , 1 , true },
547- { maingear_laptop , 1 , ACPI_EDGE_SENSITIVE , ACPI_ACTIVE_LOW , 1 , true },
548- { pcspecialist_laptop , 1 , ACPI_EDGE_SENSITIVE , ACPI_ACTIVE_LOW , 1 , true },
549- { lg_laptop , 1 , ACPI_LEVEL_SENSITIVE , ACPI_ACTIVE_LOW , 0 , false },
538+ { irq1_level_low_skip_override , 1 , ACPI_LEVEL_SENSITIVE , ACPI_ACTIVE_LOW , 0 , false },
539+ { irq1_edge_low_force_override , 1 , ACPI_EDGE_SENSITIVE , ACPI_ACTIVE_LOW , 1 , true },
550540};
551541
552542static bool acpi_dev_irq_override (u32 gsi , u8 triggering , u8 polarity ,
0 commit comments