platform/x86: asus-wmi: fix CPU fan control on recent products
authorDaniel Drake <drake@endlessm.com>
Mon, 29 Jul 2019 08:27:39 +0000 (16:27 +0800)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 30 Jul 2019 11:14:38 +0000 (14:14 +0300)
commite3168b874321d04c160c9eb937919eb926ae232f
tree15956230570c0409fb2dd3db1ce7b9d5e91cc40e
parentf1fc032192d2872caef69fb899e939bf7cc24fc7
platform/x86: asus-wmi: fix CPU fan control on recent products

Previously, asus-wmi was using the AGFN interface and FAN_CTRL device
for CPU fan control. However, this code has been found to be not fully
working on some recent products, and having checked the spec, these
interfaces are marked as being removed from future products currently
in development.

The replacement appears to be the CPU_FAN device, added in spec version
8.3 (March 2014) and present on many modern Asus laptops.

Add support for this device, and use it whenever it is detected.
The older approach based on AGFN and FAN_CTRL is used as a fallback
on products that do not have such device.

Other than switching between automatic and full speed, there is
no fan speed control through this new interface.

Signed-off-by: Daniel Drake <drake@endlessm.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/asus-wmi.c
include/linux/platform_data/x86/asus-wmi.h