summaryrefslogtreecommitdiff
path: root/drivers/platform/x86/eeepc-wmi.c
AgeCommit message (Collapse)AuthorFilesLines
2011-01-08eeepc-wmi: add touchpad led supportCorentin Chary1-0/+113
Most of the code comes from eeepc-laptop. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-01-08eeepc-wmi: rework eeepc_wmi_init and eeepc_wmi_exitCorentin Chary1-56/+79
The old code was using platform_driver.probe to initialize eeepc_wmi context. That's a mistake because if probe fail, eeepc_platform_register() won't tell anyone, and chaos will happen. Wrap add and remove code inside eeepc_wmi_add() / eeepc_wmi_remove(), and try to use the static platform_device only in eeepc_wmi_init() and eeepc_wmi_exit() The code is now very similar to eeepc-laptop, except eeepc_laptop_add and eeepc_laptop_remove are called from acpi_driver, not module init/exit functions, but WMI doesn't provide such functionalities (yet ?). Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-11-24eeepc-wmi: fix compiler warningDmitry Torokhov1-2/+2
This fixes the following: CC [M] drivers/platform/x86/eeepc-wmi.o drivers/platform/x86/eeepc-wmi.c:322: warning: initialization from incompatible pointer type Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21eeepc-wmi: Add cpufv sysfs interfaceChris Bagwell1-0/+51
eeepc-laptop provides a sysfs interface to read and control what it calls cpufv. When WMI is enabled, the ACPI interface changes slightly and becames a write-only control with 3 valid values. Expose cpufv again to allow for user space utils that can extended battery life noticably and come a little closer to parity with eeepc-laptop. Write-only is OK for most user space apps because read status was mostly used to prevent unneeded mode changes. Since this same check to ignore changes to same mode also exists in the DSDT then it was wasted ACPI call. acpi_osi="!Windows 2009" can be used for get back eeepc-laptop's read support of cpufv for debugging things such as behaviour during resume. This patch was tested with EEE PC 1005PE by monitoring powertop output while writing values of "0", "1", and "2" and by reviewing the decompiled DSDT of an 1201NL and comparing it to 1005PE's DSDT. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-10-21eeepc-wmi: add additional hotkeysChris Bagwell1-0/+5
Added 4 hotkeys using same keymap values as eeepc-latop. These are mousepad toggle, resolution change, screen off, and task manager. These were tested on 1005PE and are the Fn-F3, F4, F7, and F9, respectively. Also, added a new hot key for power toggles (Fn-Space on 1005PE) and is meant to drive cpufv interface from userspace. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-05-20drivers/platform/x86/eeepc-wmi.c: fix build warningDaniel Mack1-1/+1
drivers/platform/x86/eeepc-wmi.c: In function ‘eeepc_wmi_notify’: drivers/platform/x86/eeepc-wmi.c:209: warning: ‘new’ may be used uninitialized in this function drivers/platform/x86/eeepc-wmi.c:209: note: ‘new’ was declared here Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Matthew Garrett <mjg@redhat.com> Cc: Yong Wang <yong.y.wang@intel.com> Cc: Corentin Chary <corentincj@iksaif.net> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Tejun Heo <tj@kernel.org> Cc: platform-driver-x86@vger.kernel.org Acked-By: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-04-12eeepc-wmi: add backlight supportYong Wang1-35/+197
Add backlight support for WMI based Eee PC laptops. Signed-off-by: Yong Wang <yong.y.wang@intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com> Reviewed-by: Corentin Chary <corentincj@iksaif.net>
2010-04-12eeepc-wmi: use a platform device as parent device of all sub-devicesYong Wang1-16/+86
Add a platform device and use it as the parent device of all sub-devices. Signed-off-by: Yong Wang <yong.y.wang@intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com> Reviewed-by: Corentin Chary <corentincj@iksaif.net>
2010-04-12eeepc-wmi: add an eeepc_wmi context structureYong Wang1-23/+46
Add an eeepc_wmi context structure to manage all the sub-devices that will be implemented later on. Put input device into it first. Signed-off-by: Yong Wang <yong.y.wang@intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com> Reviewed-by: Corentin Chary <corentincj@iksaif.net>
2010-04-05eeepc-wmi: include slab.hTejun Heo1-0/+1
eeepc-wmi uses kfree() but doesn't include slab.h. Include it. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Yong Wang <yong.y.wang@intel.com>
2010-04-01eeepc-wmi: new driver for WMI based hotkeys on Eee PC laptopsYong Wang1-0/+157
Add a WMI driver for Eee PC laptops. Currently it only supports hotkeys. Signed-off-by: Yong Wang <yong.y.wang@intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com> Acked-by: Dmitry Torokhov <dtor@mail.ru>