]> git.ipfire.org Git - thirdparty/linux.git/commit
platform/x86: alienware-wmi-wmax: Add support for manual fan control
authorKurt Borja <kuurtb@gmail.com>
Sat, 29 Mar 2025 07:32:25 +0000 (04:32 -0300)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Fri, 11 Apr 2025 10:09:51 +0000 (13:09 +0300)
commit07ac275981b1f11a58dd7bb7790eed66252b072c
tree1f5786267f803da8154a6508155be694be276c14
parentd699907834959c87a6b6c5214d5e9a3e8ba6b5a1
platform/x86: alienware-wmi-wmax: Add support for manual fan control

All models with the "AWCC" WMAX device support a way of manually
controlling fans.

The PWM duty cycle of a fan can't be controlled directly. Instead the
AWCC interface let's us tune a fan `boost` value, which has the
following empirically discovered, approximate behavior over the PWM
value:

pwm = pwm_base + (fan_boost / 255) * (pwm_max - pwm_base)

Where the pwm_base is the locked PWM value controlled by the FW and
fan_boost is a value between 0 and 255.

Expose this fan_boost knob as a custom HWMON attribute.

Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Jean Delvare <jdelvare@suse.com>
Cc: linux-hwmon@vger.kernel.org
Reviewed-by: Armin Wolf <W_Armin@gmx.de>
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
Link: https://lore.kernel.org/r/20250329-hwm-v7-8-a14ea39d8a94@gmail.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/dell/alienware-wmi-wmax.c