Commit Graph

81 Commits (5dae92a718570e6a942e0b882e53d25cab03b40f)

Author SHA1 Message Date
Sergey Senozhatsky 68825ce20e acer-wmi: add Aspire 5741G touchpad toggle key
Add Aspire 5741G KEY_TOUCHPAD_TOGGLE to wmi keymap, preventing
"acer_wmi: Unknown key number - 0x85" error.

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-01-07 12:32:04 -05:00
Lee, Chun-Yi 8e2286ce07 acer-wmi: change to emit touchpad on off key
KEY_TOUCHPAD_TOOGLE key is for notice userland change touchpad state
via xf86-input-synaptics on the machine that don't toggle touchpad in
hardware. But, acer laptop actually toggle touchpad in hardware.
So, this patch change to emit KEY_TOUCHPAD_ON/OFF key when acer-wmi grab
device state of touchpad.

Reference: brc#848270
        https://bugzilla.redhat.com/show_bug.cgi?id=848270

Tested-by: Nathanael Noblet <nathanael@gnat.ca>
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 <matthew.garrett@nebula.com>
2013-01-07 12:31:42 -05:00
Lee, Chun-Yi f20aaba981 acer-wmi: fix obj is NULL but dereferenced
Fengguang Wu run coccinelle and warns about:
  drivers/platform/x86/acer-wmi.c:1200:17-21: ERROR: obj is NULL but dereferenced.
  drivers/platform/x86/acer-wmi.c:891:17-21: ERROR: obj is NULL but dereferenced.
  drivers/platform/x86/acer-wmi.c:1953:17-21: ERROR: obj is NULL but dereferenced.

It causes by the code in patch 987dfbaa65 doesn't check
obj variable should not be NULL. There have risk for dereference a NULL obj, so add
this patch to fix.

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 <matthew.garrett@nebula.com>
2013-01-07 12:31:30 -05:00
Greg Kroah-Hartman b859f15921 Drivers: platform: x86: remove __dev* attributes.
CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
markings need to be removed.

This change removes the use of __devinit, __devexit_p, __devinitdata,
__devinitconst, and __devexit from these drivers.

Based on patches originally written by Bill Pemberton, but redone by me
in order to handle some of the coding style issues better, by hand.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Joey Lee <jlee@novell.com>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Peter Feuerer <peter@piie.net>
Cc: Corentin Chary <corentin.chary@gmail.com>
Cc: Cezary Jackiewicz <cezary.jackiewicz@gmail.com>
Cc: Robert Gerlach <khnz@gmx.de>
Cc: Ike Panhc <ike.pan@canonical.com>
Cc: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-03 15:57:03 -08:00
Corentin Chary 689db7843d drivers-platform-x86: remove useless #ifdef CONFIG_ACPI_VIDEO
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-09-13 16:46:30 -04:00
Marek Vasut 1bfaf1d5bc ACER: Fix Smatch double-free issue
The patch 6ae3a0876185: "ACER: Add support for accelerometer sensor"
from Jun 1, 2012, leads to the following Smatch warning:
drivers/platform/x86/acer-wmi.c:1886 acer_wmi_accel_destroy()
         error: don't call input_free_device() after input_unregister_device()

drivers/platform/x86/acer-wmi.c
  1883  static void acer_wmi_accel_destroy(void)
  1884  {
  1885          input_unregister_device(acer_wmi_accel_dev);
  1886          input_free_device(acer_wmi_accel_dev);
  1887  }

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Fengguang Wu <wfg@linux.intel.com>
Cc: joeyli <jlee@suse.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-07-28 00:28:55 -04:00
Marek Vasut 24237c43aa ACER: Fix up sparse warning
drivers/platform/x86/acer-wmi.c:1836:18: sparse: Using plain integer as NULL pointer

drivers/platform/x86/acer-wmi.c:1836:
  1833
  1834          BUG_ON(!name || !ah);
  1835
> 1836          handle = 0;
  1837          status = acpi_get_devices(prop, acer_wmi_get_handle_cb,
  1838                                          (void *)name, &handle);
  1839

Reported-by: Fengguang Wu <wfg@linux.intel.com>

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Fengguang Wu <wfg@linux.intel.com>
Cc: joeyli <jlee@suse.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-07-28 00:28:54 -04:00
Corentin Chary a60b21763c drivers-platform-x86: use acpi_video_dmi_promote_vendor()
Instead of using directly acpi_video_unregister(), use
acpi_video_dmi_promote_vendor() (and make it call
acpi_video_unregister() if needed)

Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-07-28 00:11:48 -04:00
Marek Vasut 1eb3fe1d3b ACER: Add support for accelerometer sensor
This device is present on Iconia Tab W500.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: joeyli <jlee@suse.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-07-28 00:06:02 -04:00
Rafael J. Wysocki 3c33be0b0d acer-wmi: Use struct dev_pm_ops for power management
Make the acer-wmi driver define its PM callbacks through
a struct dev_pm_ops object rather than by using legacy PM hooks
in struct platform_driver.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Tested-by: Lee, Chun-Yi <jlee@suse.com>
Acked-by: Matthew Garrett <mjg@redhat.com>
2012-07-01 13:31:14 +02:00
Lee, Chun-Yi 050eff39af acer-wmi: add 3 laptops to video backlight vendor mode quirk table
Acer Extensa 5235, TravelMate 5760 and Aspire 5750 laptop have broken _BCM
implemenation, the AML code wrote value to EC register but firmware didn't
change brighenss.

Fortunately, the brightness control works on those machines with vendor mode.
So, add this machine to video backlight vendor mode quirk table.

Reference: bko#36322
        https://bugzilla.kernel.org/show_bug.cgi?id=36322
Reference: bko#42833
        https://bugzilla.kernel.org/show_bug.cgi?id=42833
Reference: bko#42993
        https://bugzilla.kernel.org/show_bug.cgi?id=42993

Cc: Christopher M. Penalver <christopher.penalver@gmx.com>
Cc: Bence Lukacs <lukacs.bence1@gmail.com>
Cc: Joern Heissler <kernelbugs2012@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@suse.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31 14:37:18 -04:00
Lee, Chun-Yi 86924de2a6 acer-wmi: add quirk table for video backlight vendor mode
There have some acer laptop have broken _BCM implemenation, the AML
code wrote value to EC register but firmware didn't change brighenss.

Fortunately, the brightness control works on those machines with
vendor mode. So, add quirk table for video backlight vendor mode
and unregister acpi video interface on those machines.

Tested on Acer TravelMate 4750

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>
2012-03-26 15:47:58 -04:00
Lee, Chun-Yi 5719b81988 acer-wmi: No wifi rfkill on Sony machines
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>
2012-03-26 15:45:25 -04:00
Lee, Chun-Yi c08f2086cd acer-wmi: support Lenovo ideapad S205 Brazos wifi switch
Vaclav found a new ideapad S205 Brazos machine that used the same
EC register of wireless with S205 but has different product name.

So, add this machine to quirk for support wireless rfkill.

Tested on Lenovo ideapad S205 Brazos

Tested-by: Vaclav Mocek <vmocek@gmail.com>
Acked-by: Ike Panhc <ike.pan@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>
2012-03-26 15:05:30 -04:00
Lee, Chun-Yi 996d23ba36 acer-wmi: fix out of input parameter size when set
The input parameter of set device status is different with get device
status. There have volume value element for set status but don't need
for get action.

On Acer TravelMate 4750 creates field on volume value element even
doesn't use it in DSDT. So, add this patch for separate input paramter
between set device status with get status.

Tested on Acer TravelMate 4750

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>
2012-03-26 15:05:28 -04:00
Lee, Chun-Yi 34b6cfabd7 acer-wmi: Detect communication hot key number
Currently we set a fixed hot key number to 0x01 for communction button,
but, actually, the key number is different on each acer laptop and it was
reported by SMBIOS.

So, add this patch to get the communication hot key number from Acer
OEM-specific SMBIOS Type AA.

Tested on Acer TravelMate 4750

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>
2012-03-26 15:05:27 -04:00
Sergey Senozhatsky ca1469f5f1 acer-wmi: ignore missing Aspire 5741G keys (checkpatched)
acer-wmi: ignore missing Aspire 5741G keys

Ignore Aspire's 5741G:
 KEY_PREVIOUSSONG
 KEY_NEXTSONG
 KEY_PLAYPAUSE
 KEY_STOP
 KEY_VOLUMEDOWN

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-20 12:02:24 -04:00
Merlin Schumacher 67e1d34cd5 acer-wmi: support for P key on TM8372
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>
2012-03-20 12:02:24 -04:00
Lee, Chun-Yi 38db157d7b acer-wmi: remove useless input argument for internal wmi
The "wmi_interface *iface" is a useless input argument for internal wmi get/set
functions, remove it to clear up source code.

Tested on Lenovo E520.
Tested on Acer TravelMate 4750.

Tested-by: mr.kobzar <mr.kobzar@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@suse.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-20 12:02:21 -04:00
Joe Perches 6e71f38bda acer-wmi: Message logging neatening
Use pr_warn not pr_warning.
Coalesce formats.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-20 12:02:13 -04:00
Ike Panhc 461e74377c acer-wmi: No wifi rfkill on Lenovo machines
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>
2012-03-12 09:58:02 -04:00
Lee, Chun-Yi 1d1fc8a75f acer-wmi: replaced the hard coded bitmap by the communication devices bitmap from SMBIOS
Before set communication devices state, we need query out all devices state to set
the states bitmap. That will be better use the devices bitmap in SMBIOS type Aah
instead of hardcode in driver.

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@suse.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24 16:52:42 +02:00
Lee, Chun-Yi 1fbc01a7b0 acer-wmi: check the existence of internal wireless device when set capability
That will be better to check the existence of internal wireless device
when we set wireless capability and generate killswitch for it. It can
avoid userland access wireless rfkill but the machine doesn't have internal
wireless device.

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@suse.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-10-24 16:52:42 +02:00
Lee, Chun-Yi 72e71de15f acer-wmi: add ACER_WMID_v2 interface flag to represent new notebooks
There have new acer notebooks' BIOS provide new WMID_GUID3 and
ACERWMID_EVENT_GUID methods.

Some of machines still keep the old WMID_GUID1 method but more and
more machines were already removed old wmi methods from DSDT.

So, this patch add a new ACER_WMID_v2 interface flag to represent
new acer notebooks, the following is definition:

 + ACER_WMID:
        It means this machine only provides WMID_GUID1/2 methods.

 + ACER_WMID_v2:
        It means this machine provide new WMID_GUID3 and WMID_EVENT_GUID
        methods.
        Some ACER_WMID_v2 machines also provide old WMID_GUID1/2 methods,
        but we still query/set communication device's state by new
        WMID_GUID3 method.

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>
2011-10-24 16:52:42 +02:00
Lee, Chun-Yi 1709adab07 acer-wmi: check wireless capability flag before register rfkill
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>
2011-10-24 16:52:38 +02:00
Seth Forshee be3128b107 acer-wmi: Add wireless quirk for Lenovo 3000 N200
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>
2011-10-24 16:52:37 +02:00
Lee, Chun-Yi 15b956a0b5 acer-wmi: support Lenovo ideapad S205 wifi switch
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>
2011-08-05 15:21:52 -04:00
Seth Forshee 1a04d8ffc0 acer-wmi: Add support for Aspire 1830 wlan hotkey
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 14:45:38 -04:00
Lee, Chun-Yi 7b8aca65db acer-wmi: schedule threeg and interface sysfs for feature removal
we can now autodetect internal 3G device and already have the threeg
rfkill device. So, we plan to remove threeg sysfs support for it's no
longer necessary.

We also plan to remove interface sysfs file that exposed which ACPI-WMI
interface that was used by acer-wmi driver. It will replaced by information
log when acer-wmi initial.

We keep it around for userspace compatibility reasons, schedule removal
in 2012.

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>
Acked-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Lee, Chun-Yi <jlee@novell.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 14:45:34 -04:00
Lee, Chun-Yi ae821c1b2f acer-wmi: fix bitwise bug when set device state
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>
2011-07-07 10:38:58 -04:00
Seth Forshee 92530664bb acer-wmi: Only update rfkill status for associated hotkey events
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>
2011-07-07 10:38:56 -04:00
Lee, Chun-Yi 987dfbaa65 acer-wmi: support integer return type from WMI methods
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>
2011-05-27 12:40:10 -04:00
Lee, Chun-Yi 6d88ff0f8e acer-wmi: support to set communication device state by new wmid method
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>
2011-05-27 12:38:50 -04:00
Lee, Chun-Yi ab6a931620 acer-wmi: allow 64-bits return buffer from WMI methods
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>
2011-05-27 12:38:49 -04:00
Lee, Chun-Yi a8d1a266ee acer-wmi: check the existence of internal 3G device when set capability
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>
2011-05-27 12:38:49 -04:00
Melchior FRANZ 8ae68de15d support wlan hotkey on Acer Travelmate 5735Z
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>
2011-05-27 12:38:24 -04:00
Lee, Chun-Yi c2647b5e99 acer-wmi: does not allow negative number set to initial device state
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>
2011-05-27 12:36:44 -04:00
Joe Perches 249c720d88 acer-wmi: pr_<level> cleanups
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>
2011-05-27 12:35:45 -04:00
Lee, Chun-Yi 08a0799d57 acer-wmi: Fix capitalisation of GUID in module alias
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>
2011-04-12 11:27:46 -04:00
Lee, Chun-Yi 70a9b9047a acer-wmi: does not poll device status when WMI event is available
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>
2011-03-28 06:46:14 -04:00
Lee, Chun-Yi 8215af0190 acer-wmi: does not set persistence state by rfkill_init_sw_state
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>
2011-03-28 06:46:12 -04:00
Lee, Chun-Yi cae1570264 acer-wmi: use pr_<level> for messages
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>
2011-03-28 06:46:09 -04:00
Pali Rohár 298f19b254 acer-wmi: Fix WMI ID
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>
2011-03-28 06:28:10 -04:00
Pali Rohár 9a0b74fd87 acer-wmi: deactive mail led when power off
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>
2011-03-28 06:28:09 -04:00
Lee, Chun-Yi 8941178efa acer-wmi: set the touchpad toggle key code to KEY_TOUCHPAD_TOGGLE
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>
2011-03-28 06:07:26 -04:00
Matthew Garrett bb7ca747f8 backlight: add backlight type
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>
2011-03-22 17:43:59 -07:00
Linus Torvalds e16b396ce3 Merge branch 'for-linus' of 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)
2011-03-18 10:37:40 -07:00
Matthew Garrett bbb706079a acer-wmi: Fix capitalisation of GUID
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
2011-02-21 17:06:18 -05:00
Vasiliy Kulikov b80b168f91 platform: x86: acer-wmi: world-writable sysfs threeg file
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>
2011-02-21 17:06:15 -05:00
Jesper Juhl 9a756de129 X86, Acer, WMI: Do not double include linux/dmi.h in acer-wmi.c
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>
2011-01-25 12:03:19 +01:00