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

Configure Feed

Select the types of activity you want to include in your feed.

platform/x86: alienware-wmi-wmax: Add support for the "custom" thermal profile

All models with the "AWCC" WMAX device support a "custom" thermal
profile. In some models this profile signals user-space that the user
wants to manually control the fans, which are always unlocked. In other
models it actually unlocks manual fan control.

Reviewed-by: Armin Wolf <W_Armin@gmx.de>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
Link: https://lore.kernel.org/r/20250329-hwm-v7-6-a14ea39d8a94@gmail.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

authored by

Kurt Borja and committed by
Ilpo Järvinen
3dde0ae1 32b6372d

+19 -4
+19 -4
drivers/platform/x86/dell/alienware-wmi-wmax.c
··· 30 30 #define AWCC_METHOD_THERMAL_CONTROL 0x15 31 31 #define AWCC_METHOD_GAME_SHIFT_STATUS 0x25 32 32 33 - #define AWCC_THERMAL_MODE_GMODE 0xAB 34 - 35 33 #define AWCC_FAILURE_CODE 0xFFFFFFFF 36 34 #define AWCC_FAILURE_CODE_2 0xFFFFFFFE 37 35 ··· 175 177 enum AWCC_THERMAL_TABLES { 176 178 AWCC_THERMAL_TABLE_LEGACY = 0x9, 177 179 AWCC_THERMAL_TABLE_USTT = 0xA, 180 + }; 181 + 182 + enum AWCC_SPECIAL_THERMAL_CODES { 183 + AWCC_SPECIAL_PROFILE_CUSTOM = 0x00, 184 + AWCC_SPECIAL_PROFILE_GMODE = 0xAB, 178 185 }; 179 186 180 187 enum awcc_thermal_profile { ··· 602 599 if (ret) 603 600 return ret; 604 601 605 - if (out_data == AWCC_THERMAL_MODE_GMODE) { 602 + switch (out_data) { 603 + case AWCC_SPECIAL_PROFILE_CUSTOM: 604 + *profile = PLATFORM_PROFILE_CUSTOM; 605 + return 0; 606 + case AWCC_SPECIAL_PROFILE_GMODE: 606 607 *profile = PLATFORM_PROFILE_PERFORMANCE; 607 608 return 0; 609 + default: 610 + break; 608 611 } 609 612 610 613 if (!is_awcc_thermal_profile_id(out_data)) ··· 695 686 696 687 if (awcc->gmode) { 697 688 priv->supported_profiles[PLATFORM_PROFILE_PERFORMANCE] = 698 - AWCC_THERMAL_MODE_GMODE; 689 + AWCC_SPECIAL_PROFILE_GMODE; 699 690 700 691 __set_bit(PLATFORM_PROFILE_PERFORMANCE, choices); 701 692 } 693 + 694 + /* Every model supports the "custom" profile */ 695 + priv->supported_profiles[PLATFORM_PROFILE_CUSTOM] = 696 + AWCC_SPECIAL_PROFILE_CUSTOM; 697 + 698 + __set_bit(PLATFORM_PROFILE_CUSTOM, choices); 702 699 703 700 return 0; 704 701 }