linux_dsm_epyc7002/drivers/platform/x86
Kast Bernd 53e755c21a asus-wmi: add fan control
This patch is partially based on Felipe Contrera's earlier patch, that
was discussed here: https://lkml.org/lkml/2013/10/8/800
Some problems of that patch are solved, now:

1) The main obstacle for the earlier patch seemed to be the use of
virt_to_phys, which is accepted, now

2) random memory corruption occurred on my notebook, thus DMA-able memory
is allocated now, which solves this problem

3) hwmon interface is used instead of the thermal interface, as a
hwmon device is already set up by this driver and seemed more
appropriate than the thermal interface

4) Calling the ACPI-functions was modularized thus it's possible to call
some multifunctions easily, now (by using
asus_wmi_evaluate_method_agfn).

Unfortunately the WMI doesn't support controlling both fans on
a dual-fan notebook because of an restriction in the acpi-method
"SFNS", that is callable through the wmi. If "SFNV" would be called
directly even dual fan configurations could be controlled, but not by using
wmi.

Speed readings only work on auto-mode, thus "-1" will be reported in
manual mode.
Additionally the speed readings are reported as hundreds of RPM thus
they are not too precise.

This patch is tested only on one notebook (N551JK) but a similar module,
that contained some code to try to control the second fan also, was
reported to work on an UX32VD, at least for the first fan.

As Felipe already mentioned the low-level functions are described here:
http://forum.notebookreview.com/threads/fan-control-on-asus-prime-ux31-ux31a-ux32a-ux32vd.705656/

Signed-off-by: Kast Bernd <kastbernd@gmx.de>
Acked-by: Corentin Chary <corentin.chary@gmail.com>
Cc: Corentin Chary <corentin.chary@gmail.com>
Cc: Darren Hart <dvhart@infradead.org>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-05-13 11:05:26 -07:00
..
acer-wmi.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
acerhdf.c platform-drivers-x86 for 3.19 2014-12-18 20:24:55 -08:00
alienware-wmi.c platform: x86: drop owner assignment from platform_drivers 2014-10-20 16:21:27 +02:00
amilo-rfkill.c platform: x86: drop owner assignment from platform_drivers 2014-10-20 16:21:27 +02:00
apple-gmux.c platform-drivers-x86 for 4.1 2015-04-26 13:44:46 -07:00
asus-laptop.c asus-laptop: use DEVICE_ATTR_xx macros 2015-01-28 21:21:11 -08:00
asus-nb-wmi.c asus-nb-wmi: Add another wapf=4 quirk 2014-12-03 10:10:13 -08:00
asus-wmi.c asus-wmi: add fan control 2015-05-13 11:05:26 -07:00
asus-wmi.h asus-wmi: always report brightness key events 2013-02-27 08:30:37 -05:00
classmate-laptop.c classmate-laptop: Fix sparse warning (0 as NULL) 2015-02-07 12:12:00 -08:00
compal-laptop.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
dell-laptop.c platform: x86: dell-laptop: Add support for keyboard backlight 2015-04-07 20:57:32 -07:00
dell-smo8800.c dell-smo8800: Add more ACPI ids and change description of driver 2014-12-03 10:10:19 -08:00
dell-wmi-aio.c ACPI: Clean up inclusions of ACPI header files 2013-12-07 01:03:14 +01:00
dell-wmi.c dell-wmi: Don't report keypresses on keybord illumination change 2014-12-03 10:10:16 -08:00
eeepc-laptop.c platform-drivers-x86 for 3.19 2014-12-18 20:24:55 -08:00
eeepc-wmi.c eeepc-wmi: Constify asus_quirks[] DMI table 2014-08-16 01:23:52 -07:00
fujitsu-laptop.c fujitsu-laptop: use FB_BLANK_* constants 2015-01-23 09:09:25 -08:00
fujitsu-tablet.c Input: use more descriptive KEY_ROTATE_DISPLAY instead of KEY_DIRECTION 2015-03-06 17:18:16 -08:00
hdaps.c platform: x86: drop owner assignment from platform_drivers 2014-10-20 16:21:27 +02:00
hp_accel.c hp_accel: Add support for HP ZBook 15 2014-12-03 10:10:12 -08:00
hp-wireless.c hp_wireless: Inform the user if hp_wireless_input_setup()/add() fails 2014-12-03 10:10:15 -08:00
hp-wmi.c Input: use more descriptive KEY_ROTATE_DISPLAY instead of KEY_DIRECTION 2015-03-06 17:18:16 -08:00
ibm_rtl.c efi: Make 'efi_enabled' a function to query EFI facilities 2013-01-30 11:51:59 -08:00
ideapad-laptop.c platform-drivers-x86 for 3.19 2014-12-18 20:24:55 -08:00
intel_ips.c platform-drivers-x86 for 3.19 2014-12-18 20:24:55 -08:00
intel_ips.h drm/i915, intel_ips: When i915 loads after IPS, make IPS relink to i915. 2010-12-23 09:51:36 +00:00
intel_menlow.c ACPI: Clean up inclusions of ACPI header files 2013-12-07 01:03:14 +01:00
intel_mid_powerbtn.c platform: x86: drop owner assignment from platform_drivers 2014-10-20 16:21:27 +02:00
intel_mid_thermal.c platform: x86: drop owner assignment from platform_drivers 2014-10-20 16:21:27 +02:00
intel_oaktrail.c intel-oaktrail: Fix trivial typo in comment 2015-03-14 12:06:32 -07:00
intel_pmic_gpio.c platform: x86: drop owner assignment from platform_drivers 2014-10-20 16:21:27 +02:00
intel_scu_ipc.c intel_scu_ipc: Read resources from PCI configuration 2015-01-28 21:21:11 -08:00
intel_scu_ipcutil.c intel_scu_ipc: Remove Moorestown support 2012-03-20 12:02:02 -04:00
intel-rst.c intel-rst: Clean up ACPI add function 2014-09-17 13:55:54 -07:00
intel-smartconnect.c ACPI: Clean up inclusions of ACPI header files 2013-12-07 01:03:14 +01:00
Kconfig toshiba_bluetooth: Add RFKill handler functions 2015-05-06 15:12:39 -07:00
Makefile platform/x86: Enable build support for toshiba_haps 2014-08-16 01:23:56 -07:00
msi-laptop.c platform-drivers-x86 for 3.19 2014-12-18 20:24:55 -08:00
msi-wmi.c platform: x86: Deletion of checks before backlight_device_unregister() 2014-12-03 10:10:14 -08:00
mxm-wmi.c Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86 2014-01-29 18:54:05 -08:00
panasonic-laptop.c Fix sleep / suspend keys for Toughbook CF-51 2014-04-06 12:58:11 -04:00
pvpanic.c pvpanic: Set high notifier priority 2014-06-09 17:45:36 -04:00
samsung-laptop.c samsung-laptop.c: Prefer kstrtoint over single variable sscanf 2015-02-06 18:53:59 -08:00
samsung-q10.c platform: x86: drop owner assignment from platform_drivers 2014-10-20 16:21:27 +02:00
sony-laptop.c Sony-laptop: Fix sparse warning (make undeclared var static) 2015-02-07 12:09:20 -08:00
tc1100-wmi.c platform: x86: drop owner assignment from platform_drivers 2014-10-20 16:21:27 +02:00
thinkpad_acpi.c thinkpad_acpi: off by one in adaptive_keyboard_hotkey_notify_hotkey() 2015-03-14 12:00:19 -07:00
topstar-laptop.c platform:x86: Remove OOM message after input_allocate_device 2013-11-20 18:51:03 -05:00
toshiba_acpi.c toshiba_acpi: Bump driver version to 0.22 2015-05-11 10:38:21 -07:00
toshiba_bluetooth.c toshiba_bluetooth: Change BT status message to debug 2015-05-11 10:38:18 -07:00
toshiba_haps.c toshiba_haps: Make use of DEVICE_ATTR_{RW, WO} macros 2015-05-11 10:38:22 -07:00
wmi.c wmi: Use bool function return values of true/false not 1/0 2015-04-07 20:43:12 -07:00
xo1-rfkill.c platform: x86: drop owner assignment from platform_drivers 2014-10-20 16:21:27 +02:00
xo15-ebook.c ACPI: Clean up inclusions of ACPI header files 2013-12-07 01:03:14 +01:00