Skip to content
Commit afe45277 authored by Giovanni Mascellani's avatar Giovanni Mascellani Committed by Guenter Roeck
Browse files

hwmon: (dell-smm) Add support for disabling automatic BIOS fan control



This patch exports standard hwmon pwmX_enable sysfs attribute for
enabling or disabling automatic fan control by BIOS. Standard value
"1" is for disabling automatic BIOS fan control and value "2" for
enabling.

By default BIOS auto mode is enabled by laptop firmware.

When BIOS auto mode is enabled, custom fan speed value (set via hwmon
pwmX sysfs attribute) is overwritten by SMM in few seconds and
therefore any custom settings are without effect. So this is reason
why implementing option for disabling BIOS auto mode is needed.

So finally this patch allows kernel to set and control fan speed on
laptops, but it can be dangerous (like setting speed of other fans).

The SMM commands to enable or disable automatic fan control are not
documented and are not the same on all Dell laptops. Therefore a
whitelist is used to send the correct codes only on laptopts for which
they are known.

This patch was originally developed by Pali Rohár; later Giovanni
Mascellani implemented the whitelist.

Signed-off-by: default avatarGiovanni Mascellani <gio@debian.org>
Co-Developed-by: default avatarPali Rohár <pali.rohar@gmail.com>
Signed-off-by: default avatarPali Rohár <pali.rohar@gmail.com>
Link: https://lore.kernel.org/r/20191122101519.1246458-1-gio@debian.org


[groeck: Fixed checkpatch warnings]
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 59dfa75e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment