aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/acer-wmi.c
Commit message (Collapse)AuthorAgeFilesLines
* acer-wmi: support for P key on TM8372Merlin Schumacher2012-12-031-0/+1
| | | | | | | | | | | | | | | | commit 67e1d34cd54cbf33f093f1dd53e7bda1124eb972 upstream. BugLink: http://launchpad.net/bugs/865807 There is no entry for P key on TM8372, so when P key is pressed, only "acer_wmi: Unknown key number - 0x29" in dmesg. Signed-off-by: Merlin Schumacher <merlin.schumacher@gmail.com> Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com> Cc: maximilian attems <max@stro.at> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* acer-wmi: No wifi rfkill on Sony machinesLee, Chun-Yi2012-04-131-0/+1
| | | | | | | | | | | | | | | | | | | commit 5719b81988f3c24ff694dc3a37e35b35630a3966 upstream. The wireless rfkill should charged by sony-laptop but not acer-wmi. So, add Sony's SNY5001 acpi device to blacklist in acer-wmi. Tested on Sony Vaio Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Mattia Dongili <malattia@linux.it> Cc: Dimitris N <ddarlac@gmail.com> Tested-by: Dimitris N <ddarlac@gmail.com> Signed-off-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* acer-wmi: No wifi rfkill on Lenovo machinesIke Panhc2012-03-191-1/+29
| | | | | | | | | | | | | | | | | | | | | commit 461e74377cfcfc2c0d6bbdfa8fc5fbc21b052c2a upstream. We have several reports which says acer-wmi is loaded on ideapads and register rfkill for wifi which can not be unblocked. Since ideapad-laptop also register rfkill for wifi and it works reliably, it will be fine acer-wmi is not going to register rfkill for wifi once VPC2004 is found. Also put IBM0068/LEN0068 in the list. Though thinkpad_acpi has no wifi rfkill capability, there are reports which says acer-wmi also block wireless on Thinkpad E520/E420. Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com> Cc: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* acer-wmi: check wireless capability flag before register rfkillLee, Chun-Yi2012-03-191-22/+42
| | | | | | | | | | | | | | | | | | | | | | commit 1709adab0773616da7a8190f2762e599afb0a295 upstream. There will be better to check the wireless capability flag (ACER_CAP_WIRELESS) before register wireless rfkill because maybe the machine doesn't have wifi module or the module removed by user. Tested on Acer Travelmate 8572 Tested on Acer Aspire 4739Z Tested-by: AceLan Kao <acelan.kao@canonical.com> Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Corentin Chary <corentincj@iksaif.net> Cc: Thomas Renninger <trenn@suse.de> Signed-off-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* acer-wmi: Add wireless quirk for Lenovo 3000 N200Seth Forshee2012-03-191-0/+9
| | | | | | | | | | | | | | commit be3128b107e36271f7973ef213ccde603a494fe8 upstream. This quirk fixes the wlan rfkill status on this machine. Without it, wlan is permanently soft blocked whenever acer-wmi is loaded. BugLink: https://bugs.launchpad.net/bugs/857297 Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Reviewed-by: Lee, Chun-Yi <jlee@novell.com> Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* acer-wmi: support Lenovo ideapad S205 wifi switchLee, Chun-Yi2012-03-191-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | commit 15b956a0b5651bbb1217ec374fdd67291dabb2af upstream. The AMW0 function in acer-wmi works on Lenovo ideapad S205 for control the wifi hardware state. We also found there have a 0x78 EC register exposes the state of wifi hardware switch on the machine. So, add this patch to support Lenovo ideapad S205 wifi hardware switch in acer-wmi driver. Reference: bko#37892 https://bugzilla.kernel.org/show_bug.cgi?id=37892 Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Corentin Chary <corentincj@iksaif.net> Cc: Thomas Renninger <trenn@suse.de> Tested-by: Florian Heyer <heyho@flanto.de> Signed-off-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* acer-wmi: fix bitwise bug when set device stateLee, Chun-Yi2011-07-071-3/+3
| | | | | | | | | | | | | | Fix a bitwise bug that was found by Joern Heissler, it must be OR but not AND when we query current device state. Acked-by: Joern Heissler <linux-acpi@joern.heissler.de> Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Corentin Chary <corentincj@iksaif.net> Cc: Thomas Renninger <trenn@suse.de> Signed-off-by: Lee, Chun-Yi <jlee@novell.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* acer-wmi: Only update rfkill status for associated hotkey eventsSeth Forshee2011-07-071-15/+26
| | | | | | | | | | | | acer-wmi is indiscriminately using the device state from hotkey events to update the various rfkill states. On the Aspire 1830 this can result in a soft block on the wlan when the touchpad hotkey is pressed, as it is reporting a non-zero device state that does not reflect the wireless status. To fix this, only update rfkill states when a wlan or bluetooth hotkey is pressed. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* acer-wmi: support integer return type from WMI methodsLee, Chun-Yi2011-05-271-0/+6
| | | | | | | | | | | | | | | | | | | | Acer WMID_GUID1/2 method's return value was declared to integer type on Gateway notebook. So, add this patch for support integer return type. Reference: bko#33032 https://bugzilla.kernel.org/show_bug.cgi?id=33032 Tested on Gateway NV5909H laptop Tested-by: Filipus Klutiero <chealer@gmail.com> Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Corentin Chary <corentincj@iksaif.net> Cc: Thomas Renninger <trenn@suse.de> Signed-off-by: Lee, Chun-Yi <jlee@novell.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* acer-wmi: support to set communication device state by new wmid methodLee, Chun-Yi2011-05-271-1/+110
| | | | | | | | | | | | | | | | Have many Acer notebooks' BIOS already support new WMID_GUID3 method. On those machines, that will be better set communication device by evaluate WMID_GUID3 method. Tested on Acer Travelmate 8572 Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Corentin Chary <corentincj@iksaif.net> Cc: Thomas Renninger <trenn@suse.de> Signed-off-by: Lee, Chun-Yi <jlee@novell.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* acer-wmi: allow 64-bits return buffer from WMI methodsLee, Chun-Yi2011-05-271-3/+6
| | | | | | | | | | | | | | | | | | | | | Acer WMID_GUID1/2 method's return buffer was declared to 64-bits on some Acer notebook, but WMI method only use 32-bits in return buffer. So, add this patch for allow 64-bits return buffer. Reference: bko#34142 https://bugzilla.kernel.org/show_bug.cgi?id=34142 Tested on Acer Travelmate 5735Z-452G32Mnss Tested-by: Melchior FRANZ <melchior.franz@gmail.com> Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Corentin Chary <corentincj@iksaif.net> Cc: Thomas Renninger <trenn@suse.de> Signed-off-by: Lee, Chun-Yi <jlee@novell.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* acer-wmi: check the existence of internal 3G device when set capabilityLee, Chun-Yi2011-05-271-1/+2
| | | | | | | | | | | | | | | | | | | | | That will be better to check the existence of internal 3G device when we set threeg capability and generate killswitch for threeg. It can avoid userland access 3G rfkill but the machine doesn't have internal 3G device. Reference: bko#32862 https://bugzilla.kernel.org/show_bug.cgi?id=32862 Tested on Acer Aspire 8930G, Acer Travelmate 8572 Tested-by: Hector Martin <hector@marcansoft.com> Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Corentin Chary <corentincj@iksaif.net> Cc: Thomas Renninger <trenn@suse.de> Signed-off-by: Lee, Chun-Yi <jlee@novell.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* support wlan hotkey on Acer Travelmate 5735ZMelchior FRANZ2011-05-271-1/+14
| | | | | | | | | | | On an Acer Travelmate 5735Z-452G32Mnss the WLAN-enable/disable key doesn't send 0x1 as acpi event key code, but 0x3. This patch also makes the module ignore hotkey acpi events for functions that are already handled without. This avoids warning message "keyboard: can't emulate rawmode for keycode 240". Signed-off-by: Melchior FRANZ <mfranz@aon.at> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* acer-wmi: does not allow negative number set to initial device stateLee, Chun-Yi2011-05-271-3/+5
| | | | | | | | | | | | | | The driver set module parameter value: mailled, threeg and brightness to BIOS by evaluate wmi method when driver was initialed. The default values for those parameters are -1, so, that will be better don't set negative value to BIOS. Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Lee, Chun-Yi <jlee@novell.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* acer-wmi: pr_<level> cleanupsJoe Perches2011-05-271-16/+16
| | | | | | | | Convert pr_warning to pr_warn. Add some missing newlines to pr_<level> uses. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* acer-wmi: Fix capitalisation of GUID in module aliasLee, Chun-Yi2011-04-121-1/+1
| | | | | | | | | | | | wmi:6AF4F258-B401-42Fd-BE91-3D4AC2D7C0D3 needs to be wmi:6AF4F258-B401-42FD-BE91-3D4AC2D7C0D3 in module alias for acer-wmi is automatically loaded. Cc: Pali Rohár <pali.rohar@gmail.com> Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Signed-off-by: Lee, Chun-Yi <jlee@novell.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* acer-wmi: does not poll device status when WMI event is availableLee, Chun-Yi2011-03-281-2/+18
| | | | | | | | | | | | | | | | | | | | | Acer WMI hotkey event's result include current device status, just need sync the status to killswitch after acer-wmi driver receive hotkey event but not always poll device status. This is good for performance. But, if use EC raw mode, Acer BIOS will not emit wmi event and leave EC to control device status. So, still startup polling job when doesn't detect WMI event GUID or user choice to use ec_raw_mode. Tested on Acer TravelMate 8572 notebook. Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Corentin Chary <corentincj@iksaif.net> Cc: Thomas Renninger <trenn@suse.de> Signed-off-by: Lee, Chun-Yi <jlee@novell.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* acer-wmi: does not set persistence state by rfkill_init_sw_stateLee, Chun-Yi2011-03-281-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | Acer BIOS keeps devices state when system reboot, but reset to default device states (Wlan on, Bluetooth off, wwan on) if system cold boot. That means BIOS's initial state is not always real persistence. So, removed rfkill_init_sw_state because it sets initial state to persistence then replicate to other new killswitch when rfkill-input enabled. After removed it, acer-wmi set initial soft-block state after rfkill register, and doesn't allow set_block until rfkill initial finished. Reference: bko#31002 https://bugzilla.kernel.org/show_bug.cgi?id=31002 Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Corentin Chary <corentincj@iksaif.net> Cc: Oldřich Jedlička <oldium.pro@seznam.cz> Cc: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Lee, Chun-Yi <jlee@novell.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* acer-wmi: use pr_<level> for messagesLee, Chun-Yi2011-03-281-40/+28
| | | | | | | | | | | acer-wmi: use pr_<level> for messages Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Corentin Chary <corentincj@iksaif.net> Cc: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Lee, Chun-Yi <jlee@novell.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* acer-wmi: Fix WMI IDPali Rohár2011-03-281-2/+2
| | | | | | | | | This patch change WMI ID to upper characters. With this patch module acer-wmi is automatically loaded when WMI ID is detected. Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Tested-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* acer-wmi: deactive mail led when power offPali Rohár2011-03-281-0/+14
| | | | | | | | | | This patch deactive mail led when laptop is going to hibernete/suspend or power off. After resume from hibernate/suspend correctly restore mail led state. Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Tested-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* acer-wmi: set the touchpad toggle key code to KEY_TOUCHPAD_TOGGLELee, Chun-Yi2011-03-281-1/+1
| | | | | | | | | | | | Set the touchpad toggle key code from F22 to KEY_TOUCHPAD_TOGGLE, and userspace should use udev's key re-mapping facilities while X is unable to process keycodes above 255 to adjust to the keycode. Cc: Matthew Garrett <mjg@redhat.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Lee, Chun-Yi <jlee@novell.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* backlight: add backlight typeMatthew Garrett2011-03-221-0/+1
| | | | | | | | | | | | | | | | | | | There may be multiple ways of controlling the backlight on a given machine. Allow drivers to expose the type of interface they are providing, making it possible for userspace to make appropriate policy decisions. Signed-off-by: Matthew Garrett <mjg@redhat.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: David Airlie <airlied@linux.ie> Cc: Alex Deucher <alexdeucher@gmail.com> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Len Brown <lenb@kernel.org> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'for-linus' of ↵Linus Torvalds2011-03-181-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (47 commits) doc: CONFIG_UNEVICTABLE_LRU doesn't exist anymore Update cpuset info & webiste for cgroups dcdbas: force SMI to happen when expected arch/arm/Kconfig: remove one to many l's in the word. asm-generic/user.h: Fix spelling in comment drm: fix printk typo 'sracth' Remove one to many n's in a word Documentation/filesystems/romfs.txt: fixing link to genromfs drivers:scsi Change printk typo initate -> initiate serial, pch uart: Remove duplicate inclusion of linux/pci.h header fs/eventpoll.c: fix spelling mm: Fix out-of-date comments which refers non-existent functions drm: Fix printk typo 'failled' coh901318.c: Change initate to initiate. mbox-db5500.c Change initate to initiate. edac: correct i82975x error-info reported edac: correct i82975x mci initialisation edac: correct commented info fs: update comments to point correct document target: remove duplicate include of target/target_core_device.h from drivers/target/target_core_hba.c ... Trivial conflict in fs/eventpoll.c (spelling vs addition)
| * X86, Acer, WMI: Do not double include linux/dmi.h in acer-wmi.cJesper Juhl2011-01-251-1/+0
| | | | | | | | | | | | | | | | Including linux/dmi.h once in drivers/platform/x86/acer-wmi.c is enough. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Reviewed-by: Lee, Chun-Yi <jlee@novell.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | acer-wmi: Fix capitalisation of GUIDMatthew Garrett2011-02-211-1/+1
| | | | | | | | | | | | | | | | | | 6AF4F258-B401-42fd-BE91-3D4AC2D7C0D3 needs to be 6AF4F258-B401-42FD-BE91-3D4AC2D7C0D3 to match the hardware alias. Signed-off-by: Matthew Garrett <mjg@redhat.com> Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: stable@kernel.org
* | platform: x86: acer-wmi: world-writable sysfs threeg fileVasiliy Kulikov2011-02-211-1/+1
|/ | | | | | | Don't allow everybody to write to hardware registers. Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* Merge branch 'for-next' of ↵Linus Torvalds2011-01-131-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits) Documentation/trace/events.txt: Remove obsolete sched_signal_send. writeback: fix global_dirty_limits comment runtime -> real-time ppc: fix comment typo singal -> signal drivers: fix comment typo diable -> disable. m68k: fix comment typo diable -> disable. wireless: comment typo fix diable -> disable. media: comment typo fix diable -> disable. remove doc for obsolete dynamic-printk kernel-parameter remove extraneous 'is' from Documentation/iostats.txt Fix spelling milisec -> ms in snd_ps3 module parameter description Fix spelling mistakes in comments Revert conflicting V4L changes i7core_edac: fix typos in comments mm/rmap.c: fix comment sound, ca0106: Fix assignment to 'channel'. hrtimer: fix a typo in comment init/Kconfig: fix typo anon_inodes: fix wrong function name in comment fix comment typos concerning "consistent" poll: fix a typo in comment ... Fix up trivial conflicts in: - drivers/net/wireless/iwlwifi/iwl-core.c (moved to iwl-legacy.c) - fs/ext4/ext4.h Also fix missed 'diabled' typo in drivers/net/bnx2x/bnx2x.h while at it.
| * backlight: constify backlight_opsLionel Debroux2010-11-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | backlight_device_register has been expecting a const "ops" argument, and using it as such, since 9905a43b2d563e6f89e4c63c4278ada03f2ebb14. Let's make the remaining backlight_ops instances const. Inspired by hunks of the grsecurity patch, updated for newer kernels. Signed-off-by: Lionel Debroux <lionel_debroux@yahoo.fr> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | acer-wmi: Enabled Acer Launch Manager modeFrom: Lee, Chun-Yi2011-01-071-0/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enabled Acer Launch Manager mode to disable the EC raw behavior for communication devices when WMID3 method available. And, we also add a ec_raw_mode kernel module option for enable The EC raw behavior mode when anyone what reset it back. When Acer Launch Manager mode enabled, EC will stop to touch any communication devices' RF state or power state that causes conflict with rfkill_input or any userland daemon to charge the rfkill rules. Signed-off-by: Lee, Chun-Yi <jlee@novell.com> Acked-by: Thomas Renninger <trenn@suse.de> Acked-by: Jiri Benc <jbenc@suse.cz> Acked-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* | acer-wmi: Initialize wlan/bluetooth/wwan rfkill software block stateLee, Chun-Yi2011-01-071-0/+31
| | | | | | | | | | | | | | | | | | | | | | Initial wlan/bluetooth/wwan rfkill software block state when acer-wmi driver probe. Acer notebook can save the devices state and this patch can use it to initial the devices' rfkill state. Signed-off-by: Lee, Chun-Yi <jlee@novell.com> Acked-by: Thomas Renninger <trenn@suse.de> Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* | acer-wmi: Detect the WiFi/Bluetooth/3G devices availableLee, Chun-Yi2011-01-071-7/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Check the Acer OEM-specific Type AA to detect the WiFi/Bluetooth/3G devices available or not, and set the devices capability flag. Signed-off-by: Lee, Chun-Yi <jlee@novell.com> Reviewed-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Dmitry Torokhov <dtor@mail.ru> Acked-by: Thomas Renninger <trenn@suse.de> Acked-by: Jiri Benc <jbenc@suse.cz> Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* | acer-wmi: Add 3G rfkill sysfs fileLee, Chun-Yi2011-01-071-1/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | Add 3G rfkill sysfs file for provide userland to control 3G device on/off by using WMI method. Signed-off-by: Lee, Chun-Yi <jlee@novell.com> Acked-by: Thomas Renninger <trenn@suse.de> Acked-by: Jiri Benc <jbenc@suse.cz> Acked-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Carlos Corbaho <carlos@strangeworlds.co.uk> Cc: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* | acer-wmi: Add acer wmi hotkey events supportLee, Chun-Yi2011-01-071-0/+139
|/ | | | | | | | | | | | | | Add acer wmi hotkey event support. Install a wmi notify handler to transfer wmi event key to key code, then send out keycode through acer wmi input device to userland. Signed-off-by: Lee, Chun-Yi <jlee@novell.com> Acked-by: Dmitry Torokhov <dtor@mail.ru> Acked-by: Thomas Renninger <trenn@suse.de> Acked-by: Jiri Benc <jbenc@suse.cz> Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* Don't show error if Acer WMI is not foundPascal de Bruijn2010-10-211-1/+1
| | | | Signed-off-by: Matthew Garrett <mjg@redhat.com>
* acer-wmi: remove non-used acer_quirks struct definitionAxel Lin2010-08-031-11/+0
| | | | | | | | | | | | Remove non-used acer_quirks struct definition. Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Thomas Renninger <trenn@suse.de> Cc: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* acer-wmi: fix memory leaks in wmab_execute error pathAxel Lin2010-08-031-8/+16
| | | | | | | | | | | | | | | | | | | | | | When acpi_evaluate_object() is passed ACPI_ALLOCATE_BUFFER, the caller must kfree the returned buffer if AE_OK is returned. Call Trace: wmab_execute -> wmi_evaluate_method -> acpi_evaluate_object Thus if callers of wmab_execute() pass ACPI_ALLOCATE_BUFFER, the return buffer must be kfreed if wmab_execute return AE_OK. [akpm@linux-foundation.org: avoid multiple return points, remove unneeded cast, remove unneeded initialisation of `status'] Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Thomas Renninger <trenn@suse.de> Cc: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* acer-wmi: fix memory leaks in WMID_set_capabilities and get_wmid_devicesAxel Lin2010-08-031-3/+7
| | | | | | | | | | | | | | | | | When acpi_evaluate_object() is passed ACPI_ALLOCATE_BUFFER, the caller must kfree the returned buffer if AE_OK is returned. The callers of wmi_query_block() pass ACPI_ALLOCATE_BUFFER, and thus must check its return value before accessing or kfree() on the buffer. This patch adds a missing kfree(out.pointer) before exit WMID_set_capabilities() and get_wmid_devices(). Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* acer-wmi: make dmi_matched to return 1 instead of 0Axel Lin2010-08-031-1/+1
| | | | | | | | | | | dmi_check_system() walks the table running matching functions until someone returns non zero or we hit the end. This patch makes dmi_matched to return 1 so dmi_check_system() return immediately when a match is found. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* acer-wmi: set permissions on interface file to S_IRUGOAxel Lin2010-08-031-2/+1
| | | | | | | The interface file is not writable, thus set permissions to S_IRUGO. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* acer-wmi/hp-wmi: use platform_device_unregister instead of ↵Axel Lin2010-08-031-1/+1
| | | | | | | | | platform_device_del in module_exit platform_device_unregister will also call platform_device_put() to drop reference count. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* acer-wmi: fix resource reclaim in acer_wmi_init error pathAxel Lin2010-08-031-5/+22
| | | | | | | This patch fixes the resource reclaim in acer_wmi_init error path. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo2010-03-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
* backlight: Allow properties to be passed at registrationMatthew Garrett2010-03-161-2/+5
| | | | | | | | | | Values such as max_brightness should be set before backlights are registered, but the current API doesn't allow that. Add a parameter to backlight_device_register and update drivers to ensure that they set this correctly. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* acer-wmi: Respect current backlight level when loadingCarlos Corbacho2010-02-191-1/+1
| | | | | | | | | | | Set the backlight to use the current brightness when loaded, rather than always resetting the backlight to maximum brightness. Fixes kernel bugzilla #14207 Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk> Reported-by: Denis Mukhin <denis_mukhin@yahoo.com> Signed-off-by: Len Brown <len.brown@intel.com>
* acer-wmi, msi-wmi: Remove needless DMI MODULE_ALIASThomas Renninger2009-12-241-3/+0
| | | | | | | | | | Now that we have WMI autoloading the DMI matching is not needed anymore. Signed-off-by: Thomas Renninger <trenn@suse.de> Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk> Acked-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Len Brown <len.brown@intel.com>
* Input: libps2 - additional locking for i8042 portsDmitry Torokhov2009-09-171-0/+2
| | | | | | | | | | | | | | | | | The serio ports on i8042 are not completely isolated; while we provide enough locking to ensure proper serialization when accessing control and data registers AUX and KBD ports can still have an effect on each other on PS/2 protocol level. The most prominent effect is that issuing a command for the device connected to one port may cause abort of the command currently executing by the device connected to another port. Since i8042 nor serio subsystem are not aware of the details of the PS/2 protocol (length of the commands and their replies and so on) the locking should be done on libps2 level by adding special handling when we see that we are dealing with serio port on i8042. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* acer-wmi: fix rfkill conversionAlan Jenkins2009-07-211-1/+1
| | | | | | | | Fix another polarity error introduced by the rfkill rewrite, this time in acer_rfkill_set(). Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* acer-wmi: fix rfkill conversionTroy Moure2009-06-191-2/+2
| | | | | | | | | "rfkill: rewrite" incorrectly reversed the meaning of 'state' in acer_rfkill_update() when it changed rfkill_force_state() to rfkill_set_sw_state(). Fix it. Signed-off-by: Troy Moure <twmoure@szypr.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rfkill: remove set_global_sw_stateAlan Jenkins2009-06-101-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | rfkill_set_global_sw_state() (previously rfkill_set_default()) will no longer be exported by the rewritten rfkill core. Instead, platform drivers which can provide persistent soft-rfkill state across power-down/reboot should indicate their initial state by calling rfkill_set_sw_state() before registration. Otherwise, they will be initialized to a default value during registration by a set_block call. We remove existing calls to rfkill_set_sw_state() which happen before registration, since these had no effect in the old model. If these drivers do have persistent state, the calls can be put back (subject to testing :-). This affects hp-wmi and acer-wmi. Drivers with persistent state will affect the global state only if rfkill-input is enabled. This is required, otherwise booting with wireless soft-blocked and pressing the wireless-toggle key once would have no apparent effect. This special case will be removed in future along with rfkill-input, in favour of a more flexible userspace daemon (see Documentation/feature-removal-schedule.txt). Now rfkill_global_states[n].def is only used to preserve global states over EPO, it is renamed to ".sav". Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: John W. Linville <linville@tuxdriver.com>