acer-wmi: Add driver for newer Acer laptops
Subsystems (2)
RFC PATCH 1/1 acer-wmi: Add driver for newer Acer laptops
This patch requires patch #1 from the latest WMI-ACPI patch series.
This is marked as an RFC as:
1) I'd like some review of it (the only checkpatch bugs left, at the moment, are a few printk lines over 80 characters).
2) To potential testers:
There are some differences in laptop handling on older laptops between the out-of-tree acer_acpi, and acer-wmi here.
This might cause some bugs on what I call the AMW0 type 2 Acer laptops (e.g. Aspire 5040, which I noticed the odd bug with the EC in PNP0C14 earlier). On these laptops we are using the 'WMID' laptop methods to read _and_ write wireless, bluetooth, etc.
However, this does appear to be the 'right' way to handle the hardware (so we don't need to keep getting EC reports for all these laptops), and the DSDT agrees, so if there are any bugs, it's better to flush them out now (and I can't really do that with an out-of-tree module that's trying to stay compatible with older kernels).
If this causes bugs, please report back (with full ACPI debugging enabled).
There is also a change to AMW0 type 1 (e.g. Aspire 5020); I am now fairly certain that the EC registers to read for the wireless, etc values on all these laptops are identical, so this is now hardcoded (although with the ability to override on a case-by-case basis, if I turn out to be wrong). Setting the values though is unchanged (although acer-wmi will, unlike acer_acpi, not resort to switching wireless, etc off at startup, since we no longer need to guess their real values).
Also, the /proc interface has been removed in acer-wmi. To control acer-wmi, look in /sys/devices/platform/acer-wmi/
3) This is not named 'acer-laptop' because that would imply support for all Acer laptops (e.g. including the ones covered by wistron-btns & acerhk), which this does not. The old name, acer_acpi is also not really appropriate, since this isn't a 'true' ACPI driver anymore. Therefore, acer-wmi seemed a better fit.
-Carlos
---
This is a driver for newer Acer (and Wistron) laptops. It adds wireless radio and bluetooth control, and on some laptops, exposes the mail LED and LCD backlight.
--- drivers/misc/Kconfig | 16 + drivers/misc/Makefile | 1 + drivers/misc/acer-wmi.c | 960 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 977 insertions(+), 0 deletions(-) create mode 100644 drivers/misc/acer-wmi.c
drivers/misc/Kconfig +16 -0
@@ -92,6 +92,22 @@ config TIFM_7XX1 To compile this driver as a module, choose M here: the module will be called tifm_7xx1. +config ACER_WMI + tristate "Acer Laptop WMI-ACPI Extras (EXPERIMENTAL)" + depends on X86 + depends on EXPERIMENTAL + depends on ACPI + depends on ACPI_WMI + depends on LEDS_CLASS + depends on BACKLIGHT_CLASS_DEVICE + ---help--- + This is a driver for newer Acer (and Wistron) laptops. It adds + wireless radio and bluetooth control, and on some laptops, + exposes the mail LED and LCD backlight. + + If you have a WMI-ACPI compatible Acer/ Wistron laptop, say Y or M + here. + config ASUS_LAPTOP tristate "Asus Laptop Extras (EXPERIMENTAL)" depends on X86
drivers/misc/Makefile +1 -0
@@ -6,6 +6,7 @@ obj- := misc.o # Dummy rule to force built-in.o to be made obj-$(CONFIG_IBM_ASM) += ibmasm/ obj-$(CONFIG_HDPU_FEATURES) += hdpuftrs/ obj-$(CONFIG_MSI_LAPTOP) += msi-laptop.o +obj-$(CONFIG_ACER_WMI) += acer-wmi.o obj-$(CONFIG_ASUS_LAPTOP) += asus-laptop.o obj-$(CONFIG_ATMEL_SSC) += atmel-ssc.o obj-$(CONFIG_LKDTM) += lkdtm.o
drivers/misc/acer-wmi.c new file +960 -0
960 lines not on this page · raw message
Signature · 1 line
1.5.3.4
drivers/misc/acer-wmi.c line 90
Quoted 2 lines · Carlos Corbacho
drivers/misc/acer-wmi.c new file +2
-0+#define AMW0_GUID1 "67C3371D-95A3-4C37-BB61-DD47B491DAAB" +#define WMID_GUID1 "6AF4F258-B401-42fd-BE91-3D4AC2D7C0D3"
It would be nice to export these, so wmi-based drivers could be autoloaded.
Signature · 1 line
Matthew Garrett | [email protected]
Quoted 6 lines · On Wednesday 05 December 2007 01:57:49 Matthew Garrett wrote:
drivers/misc/acer-wmi.c line 90
Quoted 2 lines · Carlos Corbacho
drivers/misc/acer-wmi.c new file +2
-0+#define AMW0_GUID1 "67C3371D-95A3-4C37-BB61-DD47B491DAAB" +#define WMID_GUID1 "6AF4F258-B401-42fd-BE91-3D4AC2D7C0D3"It would be nice to export these, so wmi-based drivers could be autoloaded.
Something like modules.wmimap? Or do you mean something else?
-Carlos
Signature · 3 lines
E-Mail: [email protected] Web: strangeworlds.co.uk GPG Key ID: 0x23EE722D
Quoted 5 lines · Carlos Corbacho
Quoted 2 lines · On Wednesday 05 December 2007 01:57:49 Matthew Garrett wrote:
It would be nice to export these, so wmi-based drivers could be autoloaded.
Something like modules.wmimap? Or do you mean something else?
Yes, that was the sort of thing I had in mind.
Signature · 1 line
Matthew Garrett | [email protected]