[PATCH] support for ASUS ROG G14 (G401I) series asus-wmi.c/asus-nb-wmi.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Support for the currently unsupported ASUS G14 Notebooks (GA401I series) to the asus(-nb)-wmi.c sources.
First change is the on the input buffer, the new devices are sending 5 DWORD instead of 3 as it was definded before. (might be already submitted upstream)

The second part of the patch adds the correct device dmi identificator.



--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -116,6 +116,8 @@
 	u32 arg0;
 	u32 arg1;
 	u32 arg2; /* At least TUF Gaming series uses 3 dword input buffer. */
+        u32 arg3; /* At least ROG Zephyrus G14 series uses 5 dword input buffer */
+        u32 arg4;
 } __packed;
 
 /*
--- a/drivers/platform/x86/asus-nb-wmi.c
+++ b/drivers/platform/x86/asus-nb-wmi.c
@@ -110,6 +110,12 @@
 	.wmi_force_als_set = true,
 };
 
+static struct quirk_entry quirk_asus_ga401i = {
+       .wapf = 4, // not sure if that is correct
+       .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,7 +417,25 @@
 		},
 		.driver_data = &quirk_asus_forceals,
 	},
-	{},
+	{
+               .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. GA401IU",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "GA401IU"),
+               },
+               .driver_data = &quirk_asus_ga401i,
+       },
+       {},
 };
 
 static void asus_nb_wmi_quirks(struct asus_wmi_driver *driver)




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux