]> git.baikalelectronics.ru Git - kernel.git/commitdiff
platform/x86: asus-nb-wmi: add support for ASUS ROG Zephyrus G14 and G15
authorArmas Spann <zappel@retarded.farm>
Sat, 11 Jul 2020 09:43:21 +0000 (11:43 +0200)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 14 Jul 2020 12:43:08 +0000 (15:43 +0300)
Add device support for the new ASUS ROG Zephyrus G14 (GA401I) and
G15 (GA502I) series.

This is accomplished by two new quirk entries (one per each series),
as well as all current available G401I/G502I DMI_PRODUCT_NAMEs to match
the corresponding devices.

Signed-off-by: Armas Spann <zappel@retarded.farm>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/asus-nb-wmi.c

index 8c4d00482ef065e336beaba09969ee6a312527eb..6c42f73c1dfd38c9bb0473b4284cf813c35ddd92 100644 (file)
@@ -110,6 +110,16 @@ static struct quirk_entry quirk_asus_forceals = {
        .wmi_force_als_set = true,
 };
 
+static struct quirk_entry quirk_asus_ga401i = {
+       .wmi_backlight_power = true,
+       .wmi_backlight_set_devstate = true,
+};
+
+static struct quirk_entry quirk_asus_ga502i = {
+       .wmi_backlight_power = true,
+       .wmi_backlight_set_devstate = true,
+};
+
 static int dmi_matched(const struct dmi_system_id *dmi)
 {
        pr_info("Identified laptop model '%s'\n", dmi->ident);
@@ -411,6 +421,78 @@ static const struct dmi_system_id asus_quirks[] = {
                },
                .driver_data = &quirk_asus_forceals,
        },
+       {
+               .callback = dmi_matched,
+               .ident = "ASUSTeK COMPUTER INC. GA401IH",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "GA401IH"),
+               },
+               .driver_data = &quirk_asus_ga401i,
+       },
+       {
+               .callback = dmi_matched,
+               .ident = "ASUSTeK COMPUTER INC. GA401II",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "GA401II"),
+               },
+               .driver_data = &quirk_asus_ga401i,
+       },
+       {
+               .callback = dmi_matched,
+               .ident = "ASUSTeK COMPUTER INC. GA401IU",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "GA401IU"),
+               },
+               .driver_data = &quirk_asus_ga401i,
+       },
+       {
+               .callback = dmi_matched,
+               .ident = "ASUSTeK COMPUTER INC. GA401IV",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "GA401IV"),
+               },
+               .driver_data = &quirk_asus_ga401i,
+       },
+       {
+               .callback = dmi_matched,
+               .ident = "ASUSTeK COMPUTER INC. GA401IVC",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "GA401IVC"),
+               },
+               .driver_data = &quirk_asus_ga401i,
+       },
+               {
+               .callback = dmi_matched,
+               .ident = "ASUSTeK COMPUTER INC. GA502II",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "GA502II"),
+               },
+               .driver_data = &quirk_asus_ga502i,
+       },
+       {
+               .callback = dmi_matched,
+               .ident = "ASUSTeK COMPUTER INC. GA502IU",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "GA502IU"),
+               },
+               .driver_data = &quirk_asus_ga502i,
+       },
+       {
+               .callback = dmi_matched,
+               .ident = "ASUSTeK COMPUTER INC. GA502IV",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "GA502IV"),
+               },
+               .driver_data = &quirk_asus_ga502i,
+       },
        {},
 };