]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-6.8/platform-x86-acer-wmi-add-predator_v4-module-paramet.patch
Fixes for 6.8
[thirdparty/kernel/stable-queue.git] / queue-6.8 / platform-x86-acer-wmi-add-predator_v4-module-paramet.patch
1 From e13ccae15c35d8c51ad575ae812d3505fd6c7500 Mon Sep 17 00:00:00 2001
2 From: Sasha Levin <sashal@kernel.org>
3 Date: Tue, 20 Feb 2024 17:04:16 +0900
4 Subject: platform/x86: acer-wmi: Add predator_v4 module parameter
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 From: SungHwan Jung <onenowy@gmail.com>
10
11 [ Upstream commit f9124f2a454a6f1edb4eae9f0646b1a61fd74dba ]
12
13 This parameter allows predator laptop users to test and use features
14 (mode button, platform profile, fan speed monitoring) without
15 adding model names to acer_quirks and compiling kernel.
16
17 Signed-off-by: SungHwan Jung <onenowy@gmail.com>
18 Link: https://lore.kernel.org/r/20240220080416.6395-1-onenowy@gmail.com
19 Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
20 Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
21 Signed-off-by: Sasha Levin <sashal@kernel.org>
22 ---
23 drivers/platform/x86/acer-wmi.c | 8 +++++++-
24 1 file changed, 7 insertions(+), 1 deletion(-)
25
26 diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
27 index 771b0ce34c8f9..ee2e164f86b9c 100644
28 --- a/drivers/platform/x86/acer-wmi.c
29 +++ b/drivers/platform/x86/acer-wmi.c
30 @@ -276,6 +276,7 @@ static bool has_type_aa;
31 static u16 commun_func_bitmap;
32 static u8 commun_fn_key_number;
33 static bool cycle_gaming_thermal_profile = true;
34 +static bool predator_v4;
35
36 module_param(mailled, int, 0444);
37 module_param(brightness, int, 0444);
38 @@ -284,6 +285,7 @@ module_param(force_series, int, 0444);
39 module_param(force_caps, int, 0444);
40 module_param(ec_raw_mode, bool, 0444);
41 module_param(cycle_gaming_thermal_profile, bool, 0644);
42 +module_param(predator_v4, bool, 0444);
43 MODULE_PARM_DESC(mailled, "Set initial state of Mail LED");
44 MODULE_PARM_DESC(brightness, "Set initial LCD backlight brightness");
45 MODULE_PARM_DESC(threeg, "Set initial state of 3G hardware");
46 @@ -292,6 +294,8 @@ MODULE_PARM_DESC(force_caps, "Force the capability bitmask to this value");
47 MODULE_PARM_DESC(ec_raw_mode, "Enable EC raw mode");
48 MODULE_PARM_DESC(cycle_gaming_thermal_profile,
49 "Set thermal mode key in cycle mode. Disabling it sets the mode key in turbo toggle mode");
50 +MODULE_PARM_DESC(predator_v4,
51 + "Enable features for predator laptops that use predator sense v4");
52
53 struct acer_data {
54 int mailled;
55 @@ -734,7 +738,9 @@ enum acer_predator_v4_thermal_profile_wmi {
56 /* Find which quirks are needed for a particular vendor/ model pair */
57 static void __init find_quirks(void)
58 {
59 - if (!force_series) {
60 + if (predator_v4) {
61 + quirks = &quirk_acer_predator_v4;
62 + } else if (!force_series) {
63 dmi_check_system(acer_quirks);
64 dmi_check_system(non_acer_quirks);
65 } else if (force_series == 2490) {
66 --
67 2.43.0
68