]> git.ipfire.org Git - thirdparty/linux.git/commit
platform/x86: hp-wmi: add manual fan control for Victus S models
authorKrishna Chomal <krishna.chomal108@gmail.com>
Tue, 13 Jan 2026 12:37:37 +0000 (18:07 +0530)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Thu, 15 Jan 2026 12:26:37 +0000 (14:26 +0200)
commit46be1453e6e61884b4840a768d1e8ffaf01a4c1c
tree594ba8b9f71727ea9b79117acb333cb1c96a92da
parent60f2d5d0f04365c41ad4f9eddf48c80dcd0b01c9
platform/x86: hp-wmi: add manual fan control for Victus S models

Add manual fan speed control and PWM reporting for HP Victus S-series
laptops.

While HPWMI_FAN_SPEED_SET_QUERY was previously added to reset max fan
mode, it is actually capable of individual fan control. This patch
implements hp_wmi_fan_speed_set() to allow manual control and hides
PWM inputs for non-Victus devices as the query is Victus specific.

The existing hp_wmi_fan_speed_max_get() query is unreliable on Victus S
firmware, often incorrectly reporting "Auto" mode even when "Max" is
active. To resolve this synchronization issue, move state tracking to
a per-device private context and apply "Auto" mode during driver
initialization to ensure a consistent starting point.

Refactor hp_wmi_apply_fan_settings() to use an intermediate ret
variable. This prepares the switch block for keep-alive logic being
added in a later patch, avoiding the need for duplicated mode check.

Tested on: HP Omen 16-wf1xxx (board ID 8C78)

Signed-off-by: Krishna Chomal <krishna.chomal108@gmail.com>
Link: https://patch.msgid.link/20260113123738.222244-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>
drivers/platform/x86/hp/hp-wmi.c