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: hp-wmi: Add support for OMEN MAX 16-ak0xxx (8D87)

The HP OMEN MAX 16-ak0xxx (8D87) requires the same WMI queries as other
Victus S devices, hence it has been added to the corresponding list.

For this reason, platform_profile_victus_s_get_ec() will be called
during thermal_profile_setup() and victus_s_powersource_event() to
obtain hardware state (platform profile) by reading from the Embedded
Controller, however, this particular board's EC does not seem to expose
the platform profile value, unlike other boards. Hence EC readback is
disabled.

Testing on board 8D87 confirmed that platform profile is registered
successfully and fan RPMs are readable and controllable.

Tested-by: Jinyang Zhu <Jakie101@proton.me>
Signed-off-by: Krishna Chomal <krishna.chomal108@gmail.com>
Link: https://patch.msgid.link/20260410191039.125659-3-krishna.chomal108@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

Krishna Chomal and committed by
Ilpo Järvinen
5badf5eb 9d317a54

+16 -2
+16 -2
drivers/platform/x86/hp/hp-wmi.c
··· 48 48 49 49 enum hp_ec_offsets { 50 50 HP_EC_OFFSET_UNKNOWN = 0x00, 51 + HP_NO_THERMAL_PROFILE_OFFSET = 0x01, 51 52 HP_VICTUS_S_EC_THERMAL_PROFILE_OFFSET = 0x59, 52 53 HP_OMEN_EC_THERMAL_PROFILE_FLAGS_OFFSET = 0x62, 53 54 HP_OMEN_EC_THERMAL_PROFILE_TIMER_OFFSET = 0x63, ··· 126 125 .balanced = HP_OMEN_V1_THERMAL_PROFILE_DEFAULT, 127 126 .low_power = HP_OMEN_V1_THERMAL_PROFILE_DEFAULT, 128 127 .ec_tp_offset = HP_OMEN_EC_THERMAL_PROFILE_OFFSET, 128 + }; 129 + 130 + static const struct thermal_profile_params omen_v1_no_ec_thermal_params = { 131 + .performance = HP_OMEN_V1_THERMAL_PROFILE_PERFORMANCE, 132 + .balanced = HP_OMEN_V1_THERMAL_PROFILE_DEFAULT, 133 + .low_power = HP_OMEN_V1_THERMAL_PROFILE_DEFAULT, 134 + .ec_tp_offset = HP_NO_THERMAL_PROFILE_OFFSET, 129 135 }; 130 136 131 137 /* ··· 238 230 { 239 231 .matches = { DMI_MATCH(DMI_BOARD_NAME, "8D41") }, 240 232 .driver_data = (void *)&victus_s_thermal_params, 233 + }, 234 + { 235 + .matches = { DMI_MATCH(DMI_BOARD_NAME, "8D87") }, 236 + .driver_data = (void *)&omen_v1_no_ec_thermal_params, 241 237 }, 242 238 {}, 243 239 }; ··· 1849 1837 const struct thermal_profile_params *params; 1850 1838 1851 1839 params = active_thermal_profile_params; 1852 - if (params->ec_tp_offset == HP_EC_OFFSET_UNKNOWN) { 1840 + if (params->ec_tp_offset == HP_EC_OFFSET_UNKNOWN || 1841 + params->ec_tp_offset == HP_NO_THERMAL_PROFILE_OFFSET) { 1853 1842 *profile = active_platform_profile; 1854 1843 return 0; 1855 1844 } ··· 2205 2192 * behaves like a wrapper around active_platform_profile, to avoid using 2206 2193 * uninitialized data, we default to PLATFORM_PROFILE_BALANCED. 2207 2194 */ 2208 - if (active_thermal_profile_params->ec_tp_offset == HP_EC_OFFSET_UNKNOWN) { 2195 + if (active_thermal_profile_params->ec_tp_offset == HP_EC_OFFSET_UNKNOWN || 2196 + active_thermal_profile_params->ec_tp_offset == HP_NO_THERMAL_PROFILE_OFFSET) { 2209 2197 active_platform_profile = PLATFORM_PROFILE_BALANCED; 2210 2198 } else { 2211 2199 err = platform_profile_victus_s_get_ec(&active_platform_profile);