Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

platform/x86: acer-wmi: Add predator_v4 module parameter

This parameter allows predator laptop users to test and use features
(mode button, platform profile, fan speed monitoring) without
adding model names to acer_quirks and compiling kernel.

Signed-off-by: SungHwan Jung <onenowy@gmail.com>
Link: https://lore.kernel.org/r/20240220080416.6395-1-onenowy@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

authored by

SungHwan Jung and committed by
Ilpo Järvinen
f9124f2a 20a36ec3

+7 -1
+7 -1
drivers/platform/x86/acer-wmi.c
··· 276 276 static u16 commun_func_bitmap; 277 277 static u8 commun_fn_key_number; 278 278 static bool cycle_gaming_thermal_profile = true; 279 + static bool predator_v4; 279 280 280 281 module_param(mailled, int, 0444); 281 282 module_param(brightness, int, 0444); ··· 285 284 module_param(force_caps, int, 0444); 286 285 module_param(ec_raw_mode, bool, 0444); 287 286 module_param(cycle_gaming_thermal_profile, bool, 0644); 287 + module_param(predator_v4, bool, 0444); 288 288 MODULE_PARM_DESC(mailled, "Set initial state of Mail LED"); 289 289 MODULE_PARM_DESC(brightness, "Set initial LCD backlight brightness"); 290 290 MODULE_PARM_DESC(threeg, "Set initial state of 3G hardware"); ··· 294 292 MODULE_PARM_DESC(ec_raw_mode, "Enable EC raw mode"); 295 293 MODULE_PARM_DESC(cycle_gaming_thermal_profile, 296 294 "Set thermal mode key in cycle mode. Disabling it sets the mode key in turbo toggle mode"); 295 + MODULE_PARM_DESC(predator_v4, 296 + "Enable features for predator laptops that use predator sense v4"); 297 297 298 298 struct acer_data { 299 299 int mailled; ··· 738 734 /* Find which quirks are needed for a particular vendor/ model pair */ 739 735 static void __init find_quirks(void) 740 736 { 741 - if (!force_series) { 737 + if (predator_v4) { 738 + quirks = &quirk_acer_predator_v4; 739 + } else if (!force_series) { 742 740 dmi_check_system(acer_quirks); 743 741 dmi_check_system(non_acer_quirks); 744 742 } else if (force_series == 2490) {