diff options
Diffstat (limited to 'asus-wmi.patch')
-rw-r--r-- | asus-wmi.patch | 63 |
1 files changed, 41 insertions, 22 deletions
diff --git a/asus-wmi.patch b/asus-wmi.patch index 8d8b62f90d6e..ce2c1aab08fb 100644 --- a/asus-wmi.patch +++ b/asus-wmi.patch @@ -1,26 +1,8 @@ ---- 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; - - /* -@@ -1722,7 +1724,7 @@ - asus->fan_boost_mode = new_mode; - fan_boost_mode_write(asus); - -- return result; -+ return count; - } - - // Fan boost mode: 0 - normal, 1 - overboost, 2 - silent +diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c +index c4404d9c1de4..e449f4b050c2 100644 --- a/drivers/platform/x86/asus-nb-wmi.c +++ b/drivers/platform/x86/asus-nb-wmi.c -@@ -110,6 +110,12 @@ +@@ -110,6 +110,18 @@ static struct quirk_entry quirk_asus_forceals = { .wmi_force_als_set = true, }; @@ -30,10 +12,16 @@ + .wmi_backlight_set_devstate = true, +}; + ++static struct quirk_entry quirk_asus_ga502i = { ++ .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 @@ +@@ -411,7 +423,34 @@ static const struct dmi_system_id asus_quirks[] = { }, .driver_data = &quirk_asus_forceals, }, @@ -56,7 +44,38 @@ + }, + .driver_data = &quirk_asus_ga401i, + }, ++ { ++ .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, ++ }, + {}, }; static void asus_nb_wmi_quirks(struct asus_wmi_driver *driver) +diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c +index 01becbe2a9a8..acbc3626852b 100644 +--- a/drivers/platform/x86/asus-wmi.c ++++ b/drivers/platform/x86/asus-wmi.c +@@ -116,6 +116,8 @@ struct bios_args { + 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; + + /* +@@ -1722,7 +1724,7 @@ static ssize_t fan_boost_mode_store(struct device *dev, + asus->fan_boost_mode = new_mode; + fan_boost_mode_write(asus); + +- return result; ++ return count; + } + + // Fan boost mode: 0 - normal, 1 - overboost, 2 - silent |