Skip to contentSkip to conversation

staging: new asus fan driver

PATCH New Felipe Contreras 1 participant 1 message Nov 5, 2013 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 staging: new asus fan driver

Simple driver to enable control of the fan in ASUS laptops. So far this has only been tested in ASUS Zenbook Prime UX31A, but according to some online reference [1], it should work in other models as well.

The implementation is very straight-forward, the only caveat is that the fan speed needs to be saved after it has been manually changed because it won't be reported properly until it goes back to 'auto' mode.

[1] http://forum.notebookreview.com/asus/705656-fan-control-asus-prime-ux31-ux31a-ux32a-ux32vd.html

---

Changes since v1:
* Added a missing TODO file
* Added missing Makefile

Two incarnations of this code exists [1][2], one that used ACPI methods directly, and one through WMI. Unfortunately the WMI version needs us to pass physicall addresses which is not exactly clean, and that's the only reason the code is proposed for staging.

Most likely this cannot graduate until acpica gets support to receive virtual addresses.

[1] http://article.gmane.org/gmane.linux.power-management.general/36774
[2] http://article.gmane.org/gmane.linux.kernel/1576463

 drivers/staging/Kconfig                     |   2 +
 drivers/staging/Makefile                    |   1 +
 drivers/staging/asus-thermal/Kconfig        |   7 ++
 drivers/staging/asus-thermal/Makefile       |   1 +
 drivers/staging/asus-thermal/TODO           |   5 +
 drivers/staging/asus-thermal/asus_thermal.c | 166 ++++++++++++++++++++++++++++
 6 files changed, 182 insertions(+)
 create mode 100644 drivers/staging/asus-thermal/Kconfig
 create mode 100644 drivers/staging/asus-thermal/Makefile
 create mode 100644 drivers/staging/asus-thermal/TODO
 create mode 100644 drivers/staging/asus-thermal/asus_thermal.c
drivers/staging/Kconfig +2 -0
index 3626dbc8..b245af5 100644
@@ -148,4 +148,6 @@ source "drivers/staging/dgnc/Kconfig"
 
 source "drivers/staging/dgap/Kconfig"
 
+source "drivers/staging/asus-thermal/Kconfig"
+
 endif # STAGING
drivers/staging/Makefile +1 -0
index d1b4b80..70e4456 100644
@@ -66,3 +66,4 @@ obj-$(CONFIG_USB_BTMTK)		+= btmtk_usb/
 obj-$(CONFIG_XILLYBUS)		+= xillybus/
 obj-$(CONFIG_DGNC)			+= dgnc/
 obj-$(CONFIG_DGAP)			+= dgap/
+obj-$(CONFIG_ASUS_THERMAL)	+= asus-thermal/
drivers/staging/asus-thermal/Kconfig new file +7 -0
new file mode 100644
index 0000000..8bf7db4
@@ -0,0 +1,7 @@
+config ASUS_THERMAL
+	tristate "ASUS thermal driver"
+	depends on THERMAL
+	depends on X86
+	help
+	  Enables control of the fan in ASUS laptops.
+
drivers/staging/asus-thermal/Makefile new file +1 -0
new file mode 100644
index 0000000..ec05519
@@ -0,0 +1 @@
+obj-$(CONFIG_ASUS_THERMAL)	+= asus_thermal.o
drivers/staging/asus-thermal/TODO new file +5 -0
new file mode 100644
index 0000000..cecf435
@@ -0,0 +1,5 @@
+TODO:
+- Get rid of virt_to_phys()
+
+Please send any patches to Greg Kroah-Hartman <[email protected]>,
+Felipe Contreras <[email protected]>
drivers/staging/asus-thermal/asus_thermal.c new file +166 -0

166 lines not on this page · raw message

Signature · 1 line
1.8.4.2+fc1