mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Final round of fixes for new version
This commit is contained in:
37
reverse_eng/asus-fan-p2.patch
Normal file
37
reverse_eng/asus-fan-p2.patch
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
drivers/platform/x86/asus-wmi.c | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
|
||||
index f10ec9d745e5..469f1a852719 100644
|
||||
--- a/drivers/platform/x86/asus-wmi.c
|
||||
+++ b/drivers/platform/x86/asus-wmi.c
|
||||
@@ -1780,6 +1780,15 @@ static int throttle_thermal_policy_write(struct asus_wmi *asus)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int throttle_thermal_policy_set_default(struct asus_wmi *asus)
|
||||
+{
|
||||
+ if (!asus->throttle_thermal_policy_available)
|
||||
+ return 0;
|
||||
+
|
||||
+ asus->throttle_thermal_policy_mode = ASUS_THROTTLE_THERMAL_POLICY_DEFAULT;
|
||||
+ return throttle_thermal_policy_write(asus);
|
||||
+}
|
||||
+
|
||||
static int throttle_thermal_policy_switch_next(struct asus_wmi *asus)
|
||||
{
|
||||
u8 new_mode = asus->throttle_thermal_policy_mode + 1;
|
||||
@@ -2548,6 +2557,8 @@ static int asus_wmi_add(struct platform_device *pdev)
|
||||
err = throttle_thermal_policy_check_present(asus);
|
||||
if (err)
|
||||
goto fail_throttle_thermal_policy;
|
||||
+ else
|
||||
+ throttle_thermal_policy_set_default(asus);
|
||||
|
||||
err = asus_wmi_sysfs_init(asus->platform_device);
|
||||
if (err)
|
||||
--
|
||||
2.24.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user