summaryrefslogtreecommitdiff
path: root/drivers/platform/x86/asus-nb-wmi.c
AgeCommit message (Collapse)Author
2017-11-27platform/x86: asus-nb-wmi: Support ALS on the Zenbook UX430UQKiernan Hager
This patch adds support for ALS on the Zenbook UX430UQ to the asus_nb_wmi driver. It also renames "quirk_asus_ux330uak" to "quirk_asus_forceals" because it is now used for more than one model of computer, and should thus have a more general name. Signed-off-by: Kiernan Hager <kah.listaddress@gmail.com> [andy: massaged commit message, fixed indentation and commas in the code] Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-04-28platform/x86: asus-wmi: try to set als by defaultOleksij Rempel
some laptops, for example ASUS UX330UAK, have brocken als_get function but working als_set funktion. In this case, ALS will stay turned off. Method (WMNB, 3, Serialized) { ... If (Local0 == 0x53545344) { ... If (IIA0 == 0x00050001) { If (!ALSP) { Return (0x02) } Local0 = (GALS & 0x10) <<<---- bug, should be: (GALS () & 0x10) If (Local0) { Return (0x00050001) } Else { Return (0x00050000) } } ..... If (Local0 == 0x53564544) { ... If (IIA0 == 0x00050001) { Return (ALSC (IIA1)) } ...... Method (GALS, 0, NotSerialized) { Local0 = Zero Local0 |= 0x20 If (ALAE) { Local0 |= 0x10 } Local1 = 0x0A Local1 <<= 0x08 Local0 |= Local1 Return (Local0) } Since it works without problems on Windows I assume ASUS WMI driver for Win never trying to get ALS state, and instead it is setting it by default to ON. This patch will do the same. Turn ALS on by default. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-04-13platform/x86: asus-nb-wmi: Add wapf4 quirk for the X302UASanteri Toivonen
Asus laptop X302UA starts up with Wi-Fi disabled, without a way to enable it. Set wapf=4 to fix the problem. Signed-off-by: Santeri Toivonen <santeri.toivonen@vatsul.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-03-12platform/x86: asus-wmi: Remove quirk_no_rfkillJoão Paulo Rechi Vita
With the detection introduced in the previous patches, we don't need these static DMI-based quirks anymore. This reverts the following commits: 56a37a72002b "asus-wmi: Add quirk_no_rfkill_wapf4 for the Asus X456UA" a961a285b479 "asus-wmi: Add quirk_no_rfkill_wapf4 for the Asus X456UF" 6b7ff2af5286 "asus-wmi: Add quirk_no_rfkill for the Asus Z550MA" 02db9ff7af18 "asus-wmi: Add quirk_no_rfkill for the Asus U303LB" 2d735244b798 "asus-wmi: Add quirk_no_rfkill for the Asus N552VW" a977e59c0c67 "asus-wmi: Create quirk for airplane_mode LED" Signed-off-by: João Paulo Rechi Vita <jprvita@endlessm.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> [dvhart: minor commit message corrections] Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2016-12-13platform/x86: asus-nb-wmi.c: Add X45U quirkMarcos Paulo de Souza
Without this patch, the Asus X45U wireless card can't be turned on (hard-blocked), but after a suspend/resume it just starts working. Following this bug report[1], there are other cases like this one, but this Asus is the only model that I can test. [1] https://ubuntuforums.org/showthread.php?t=2181558 Cc: stable@vger.kernel.org # 4.4.x- Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2016-12-13platform/x86: asus-nb-wmi: Make use of dmi->identMarcos Paulo de Souza
Make use of dmi->ident as other drivers do, like fujitsu, intel, hp and samsung. Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2016-12-13platform/x86: asus-wmi: Set specified XUSB2PR value for X550LBKai-Chuan Hsieh
The bluetooth adapter Atheros AR3012 can't be enumerated and make the bluetooth function broken. T: Bus=02 Lev=01 Prnt=01 Port=05 Cnt=02 Dev#= 5 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=13d3 ProdID=3362 Rev=00.02 S: Manufacturer=Atheros Communications S: Product=Bluetooth USB Host Controller S: SerialNumber=Alaska Day 2006 C: #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA I: If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb The error is: usb 2-6: device not accepting address 7, error -62 usb usb2-port6: unable to enumerate USB device It is caused by adapter's connected port is mapped to xHC controller, but the xHCI is not supported by the usb device. The output of 'sudo lspci -nnxxx -s 00:14.0': 00:14.0 USB controller [0c03]: Intel Corporation 8 Series USB xHCI HC [8086:9c31] (rev 04) 00: 86 80 31 9c 06 04 90 02 04 30 03 0c 00 00 00 00 10: 04 00 a0 f7 00 00 00 00 00 00 00 00 00 00 00 00 20: 00 00 00 00 00 00 00 00 00 00 00 00 43 10 1f 20 30: 00 00 00 00 70 00 00 00 00 00 00 00 0b 01 00 00 40: fd 01 36 80 89 c6 0f 80 00 00 00 00 00 00 00 00 50: 5f 2e ce 0f 00 00 00 00 00 00 00 00 00 00 00 00 60: 30 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 70: 01 80 c2 c1 08 00 00 00 00 00 00 00 00 00 00 00 80: 05 00 87 00 0c a0 e0 fe 00 00 00 00 a1 41 00 00 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 a0: 00 01 04 00 00 00 00 00 00 00 00 00 00 00 00 00 b0: 0f 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 c0: 03 c0 30 00 00 00 00 00 03 0c 00 00 00 00 00 00 d0: f9 01 00 00 f9 01 00 00 0f 00 00 00 0f 00 00 00 e0: 00 08 00 00 00 00 00 00 00 00 00 00 d8 d8 00 00 f0: 00 00 00 00 00 00 00 00 b1 0f 04 08 00 00 00 00 By referencing Intel Platform Controller Hub(PCH) datasheet, the xHC USB 2.0 Port Routing(XUSB2PR) at offset 0xD0-0xD3h decides the setting of mapping the port to EHCI controller or xHC controller. And the port mapped to xHC will enable xHCI during bus resume. The setting of disabling bluetooth adapter's connected port is 0x000001D9. The value can be obtained by few times 1 bit flip operation. The suited configuration should have the 'lsusb -t' result with bluetooth using ehci: /: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/9p, 480M |__ Port 5: Dev 2, If 0, Class=Video, Driver=uvcvideo, 480M |__ Port 5: Dev 2, If 1, Class=Video, Driver=uvcvideo, 480M /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M |__ Port 6: Dev 3, If 0, Class=Wireless, Driver=btusb, 12M |__ Port 6: Dev 3, If 1, Class=Wireless, Driver=btusb, 12M Signed-off-by: Kai-Chuan Hsieh <kai.chiuan@gmail.com> Acked-by: Corentin Chary <corentin.chary@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> [andy: resolve merge conflict in asus-wmi.h] Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2016-09-23platform/x86: asus-wmi: Filter buggy scan codes on ASUS Q500AOleksij Rempel
Some revisions of the ASUS Q500A series have a keyboard related issue which is reproducible only after Windows with installed ASUS tools is started. In this case the Linux side will have a blocked keyboard or report incorrect or incomplete hotkey events. To make Linux work properly again, a complete power down (unplug power supply and remove battery) is needed. Linux/atkbd after a clean start will get the following code on VOLUME_UP key: {0xe0, 0x30, 0xe0, 0xb0}. After Windows, the same key will generate this codes: {0xe1, 0x23, 0xe0, 0x30, 0xe0, 0xb0}. As result atkdb will be confused by buggy codes. This patch is filtering this buggy code out. https://bugzilla.kernel.org/show_bug.cgi?id=119391 Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Cc: Alex Henrie <alexhenrie24@gmail.com> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Corentin Chary <corentin.chary@gmail.com> Cc: acpi4asus-user@lists.sourceforge.net Cc: platform-driver-x86@vger.kernel.org Cc: linux-kernel@vger.kernel.org [dvhart: Add return after pr_warn to avoid false confirmation of filter] Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-09-23platform/x86: asus-wmi: fix asus ux303ub brightness issuezino lin
acpi_video0 doesn't work, asus-wmi brightness interface doesn't work, too. So, we use native brightness interface to handle the brightness adjustion, and add quirk_asus_ux303ub. Signed-off-by: zino lin <linzino7@gmail.com> Acked-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-07-01asus-wmi: Add quirk_no_rfkill_wapf4 for the Asus X456UAJoão Paulo Rechi Vita
The Asus X456UA has an airplane-mode indicator LED and the WMI WLAN user bit set, so asus-wmi uses ASUS_WMI_DEVID_WLAN_LED (0x00010002) to store the wlan state, which has a side-effect of driving the airplane mode indicator LED in an inverted fashion. quirk_no_rfkill prevents asus-wmi from registering RFKill switches at all for this laptop and allows asus-wireless to drive the LED through the ASHS ACPI device. This laptop already has a quirk for setting WAPF=4, so use quirk_no_rfkill_wapf4, which both disables rfkill and sets WAPF=4. Signed-off-by: João Paulo Rechi Vita <jprvita@endlessm.com> Reported-by: Angela Traeger <angie@endlessm.com> Reviewed-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-07-01asus-wmi: Add quirk_no_rfkill_wapf4 for the Asus X456UFJoão Paulo Rechi Vita
The Asus X456UF has an airplane-mode indicator LED and the WMI WLAN user bit set, so asus-wmi uses ASUS_WMI_DEVID_WLAN_LED (0x00010002) to store the wlan state, which has a side-effect of driving the airplane mode indicator LED in an inverted fashion. quirk_no_rfkill prevents asus-wmi from registering RFKill switches at all for this laptop and allows asus-wireless to drive the LED through the ASHS ACPI device. This laptop already has a quirk for setting WAPF=4, so this commit creates a new quirk, quirk_no_rfkill_wapf4, which both disables rfkill and sets WAPF=4. Signed-off-by: João Paulo Rechi Vita <jprvita@endlessm.com> Reported-by: Carlo Caione <carlo@endlessm.com> Reviewed-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-07-01asus-wmi: Add quirk_no_rfkill for the Asus Z550MAJoão Paulo Rechi Vita
The Asus Z550MA has an airplane-mode indicator LED and the WMI WLAN user bit set, so asus-wmi uses ASUS_WMI_DEVID_WLAN_LED (0x00010002) to store the wlan state, which has a side-effect of driving the airplane mode indicator LED in an inverted fashion. quirk_no_rfkill prevents asus-wmi from registering RFKill switches at all for this laptop and allows asus-wireless to drive the LED through the ASHS ACPI device. Signed-off-by: João Paulo Rechi Vita <jprvita@endlessm.com> Reported-by: Ming Shuo Chiu <chiu@endlessm.com> Reviewed-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-07-01asus-wmi: Add quirk_no_rfkill for the Asus U303LBJoão Paulo Rechi Vita
The Asus U303LB has an airplane-mode indicator LED and the WMI WLAN user bit set, so asus-wmi uses ASUS_WMI_DEVID_WLAN_LED (0x00010002) to store the wlan state, which has a side-effect of driving the airplane mode indicator LED in an inverted fashion. quirk_no_rfkill prevents asus-wmi from registering RFKill switches at all for this laptop and allows asus-wireless to drive the LED through the ASHS ACPI device. Signed-off-by: João Paulo Rechi Vita <jprvita@endlessm.com> Reported-by: Mousou Yuu <guogaishiwo@gmail.com> Reviewed-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-07-01asus-wmi: Add quirk_no_rfkill for the Asus N552VWJoão Paulo Rechi Vita
The Asus N552VW has an airplane-mode indicator LED and the WMI WLAN user bit set, so asus-wmi uses ASUS_WMI_DEVID_WLAN_LED (0x00010002) to store the wlan state, which has a side-effect of driving the airplane mode indicator LED in an inverted fashion. quirk_no_rfkill prevents asus-wmi from registering RFKill switches at all for this laptop and allows asus-wireless to drive the LED through the ASHS ACPI device. Signed-off-by: João Paulo Rechi Vita <jprvita@endlessm.com> Reviewed-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-07-01asus-wmi: Create quirk for airplane_mode LEDJoão Paulo Rechi Vita
Some Asus laptops that have an airplane-mode indicator LED, also have the WMI WLAN user bit set, and the following bits in their DSDT: Scope (_SB) { (...) Device (ATKD) { (...) Method (WMNB, 3, Serialized) { (...) If (LEqual (IIA0, 0x00010002)) { OWGD (IIA1) Return (One) } } } } So when asus-wmi uses ASUS_WMI_DEVID_WLAN_LED (0x00010002) to store the wlan state, it drives the airplane-mode indicator LED (through the call to OWGD) in an inverted fashion: the LED is ON when airplane mode is OFF (since wlan is ON), and vice-versa. This commit creates a quirk to not register a RFKill switch at all for these laptops, to allow the asus-wireless driver to drive the airplane mode LED correctly through the ASHS ACPI device. It also adds a match to that quirk for the Asus X555UB, which is affected by this problem. Signed-off-by: João Paulo Rechi Vita <jprvita@endlessm.com> Reviewed-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-06-28asus-wmi: Add ambient light sensor toggle keyNick Leiten
Ausu laptops issue key 0x7A when the toggle ALS key is pressed (Fn+A on Asus U38N). Update the key_entry so userspace can handle the event. Tested on Asus U38N. Signed-off-by: Nick Leiten <nickleiten@gmail.com> Reviewed-By: Corentin Chary <corentin.chary@gmail.com> [dvhart: cleaned up commit message and comment line length] Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-03-23asus-nb-wmi: add wapf=4 quirk for ASUS X75VDOleksandr Natalenko
Wi-Fi on ASUS X75VD laptop does not work unless asus_nb_wmi module is loaded with wapf=4 option. Add quirk for this. Signed-off-by: Oleksandr Natalenko <oleksandr@natalenko.name> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-09-06asus-nb-wmi: Add wapf=4 quirk for X456UA/X456UFDaniel Drake
These laptops boot with wifi as hard-blocked, with no obvious way to enable it. Using a quirk to set wapf=4 solves the problem. Signed-off-by: Daniel Drake <drake@endlessm.com> Acked-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-12-03asus-nb-wmi: Add another wapf=4 quirkHans de Goede
Wifi on this laptop does not work unless asus-nb-wmi.wapf=4 is specified on the kerne commandline, add a quirk for this. Cc: stable@vger.kernel.org BugLink: https://bugs.launchpad.net/bugs/1173681 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-10-27asus-nb-wmi: Add wapf4 quirk for the X550VBStanislaw Gruszka
X550VB as many others Asus laptops need wapf4 quirk to make RFKILL switch be functional. Otherwise system boots with wireless card disabled and is only possible to enable it by suspend/resume. Bug report: http://bugzilla.redhat.com/show_bug.cgi?id=1089731#c23 Reported-and-tested-by: Vratislav Podzimek <vpodzime@redhat.com> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-08-16asus-nb-wmi: Add wapf4 quirk for the U32UHans de Goede
As reported here: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1173681 the U32U needs wapf=4 too. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-08-16asus-nb-wmi.c: Rename x401u quirk to wapf4Hans de Goede
The actual x401u does not use the so named x401u quirk but the x55u quirk. All that the x401u quirk does it setting wapf to 4, so rename it to wapf4 to stop the confusion. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-08-16asus-nb-wmi: Add wapf4 quirk for the X550CCHans de Goede
As reported here: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1173681 the X550CC needs wapf=4 too. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-08-16asus-nb-wmi: Constify asus_quirks[] DMI tableMathias Krause
Constify the asus_quirks[] DMI table. There's no need to have it writeable during runtime. Signed-off-by: Mathias Krause <minipli@googlemail.com> Cc: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-08-16asus-nb-wmi: Add wapf4 quirk for the X550CLHans de Goede
As reported here: https://bugs.launchpad.net/bugs/1277959 the X550CL needs wapf=4 too. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-08-16asus-nb-wmi: Add ASUSTeK COMPUTER INC. X200CAAceLan Kao
BIOS won't light on the wifi-led after S3, so asus-wmi driver needs to control the wifi and wifi-led status. But, it'll lead to bt status error if asus-wmi driver controls bt as well. So, for X200CA, asus-wmi driver controls wifi status only and have to set wapf to 1. Signed-off-by: AceLan Kao <acelan.kao@canonical.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-08-16WAPF 4 for ASUSTeK COMPUTER INC. X75VBP WLAN ON.poma
The 'asus-nb-wmi' WAPF parameter must be set to 4, so the internal Wireless LAN device is operational. Signed-off-by: poma <pomidorabelisima@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-06-10asus-wmi: Set WAPF to 4 for Asus X550CAAndreas Utterberg
The 'asus-nb-wmi' WAPF parameter must be set to 4, so the internal Wireless LAN device is operational. Signed-off-by: Andreas Utterberg <andreas.utterberg@thundera.se> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-07-10asus-nb-wmi: set wapf=4 for ASUSTeK COMPUTER INC. 1015E/UAceLan Kao
Need to set wapf to 4 for ASUSTeK COMPUTER INC. 1015E/U, so that user can toggle wifi function through function key correctly. Signed-off-by: AceLan Kao <acelan.kao@canonical.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-07-10asus-nb-wmi: ignore ALS notification key codeViktar Vauchkevich
Ignore Ambient Light Sensor notification key code 0xC6 found in ASUS UX31a. When the illuminance changes dmesg shows: [10814.939979] asus_wmi: Unknown key c6 pressed Signed-off-by: Viktar Vauchkevich <victorenator@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-05-08asus-nb-wmi: set wapf=4 for ASUSTeK COMPUTER INC. X75AAceLan Kao
BugLink: http://bugs.launchpad.net/bugs/1172151 Need to set wapf to 4 for ASUSTeK COMPUTER INC. X75A, so that user can toggle wifi function through function key correctly. Signed-off-by: AceLan Kao <acelan.kao@canonical.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-02-27asus-wmi: always report brightness key eventsCorentin Chary
Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-02-24asus-nb-wmi: add all video switch keysAceLan Kao
Fill up all the video switch keys in the map. Signed-off-by: AceLan Kao <acelan.kao@canonical.com> Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-02-24asus-wmi: add display toggle quirkAceLan Kao
For machines with AMD graphic chips, it will send out WMI event and ACPI interrupt at the same time while hitting the hotkey. BIOS will notify the system the next display output mode throught WMI event code, so that windows' application can show an OSD to tell the user which mode will be taken effect. User can hit the display toggle key many times within 2 seconds to choose the mode they want. After 2 seconds, WMI dirver should send a WMIMethod(SDSP) command to tell the BIOS which mode the user chose. And then BIOS will raise another ACPI interrupt to tell the system to really switch the display mode. In Linux desktop, we don't have this kind of OSD to let users to choose the mode they want, so we don't need to call WMIMethod(SDSP) to have another ACPI interrupt. To simplify the problem, we just have to ignore the WMI event, and let the first ACPI interrupt to send out the key event. For the need, here comes another quirk to add machines with this kind of behavior. When the WMI driver receives the display toggle WMI event, and found the machin is in the list, it will do nothing and let ACPI video driver to report the key event. Signed-off-by: AceLan Kao <acelan.kao@canonical.com> Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-02-24asus-nb-wmi: correct a touchpad hotkey mappingAceLan Kao
0x60 is touchpad enable key, but is misdefined in the keymap. Signed-off-by: AceLan Kao <acelan.kao@canonical.com> Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-02-24asus-{nb-wmi|laptop}.c: sync keymapsCorentin Chary
Maybe this should be shared in another module... Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-02-24asus-laptop: map some new keysCorentin Chary
Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2012-12-17Corentin has movedCorentin Chary
Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Cc: Matthew Garrett <mjg59@srcf.ucam.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-07-28asus-nb-wmi: add some video toggle keysAceLan Kao
There are some new video switch keys that used by newer machines. 0xA0 - SDSP HDMI only 0xA1 - SDSP LCD + HDMI 0xA2 - SDSP CRT + HDMI 0xA3 - SDSP TV + HDMI But in Linux, there is no suitable userspace application to handle this, so, mapping them all to KEY_SWITCHVIDEOMODE. Signed-off-by: AceLan Kao <acelan.kao@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-07-28asus-nb-wmi: add wapf quirk for ASUS machinesAceLan Kao
The BIOS of these machines will try to enable/disable wifi/bt in their own sqeuence. It won't read the enable/disable parameter in WMI command, but just iterates the wifi/bt's status described below 1st. enable wifi, enable bt 2nd. disable wifi, enable bt 3rd. enable wifi, disable bt 4th. disable wifi, disable bt That will totally mess up the rfkill status, since we will try to read wifi and bt's status and reset it again while booting up. To avoid this, these machines should set the wapf value to 4, that will let software totally control the wifi/bt's status and BIOS will do nothing instead of sending out the 0x88(KEY_RFKILL) event instead of 0x5e(wifi enable), 0x5f(wifi diable), 0x7d(bt enable), and 0x7e(bt disable) through WMI. With this patch[1], it will handle the KEY_RFKILL event correctly and will block/unblock wifi and bt together. 1. https://lkml.org/lkml/2012/5/21/75 Signed-off-by: AceLan Kao <acelan.kao@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-26asus-nb-wmi: set panel_power correctlyCorentin Chary
Even if it's currently unused. Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-26asus-wmi: move WAPF variable into quirks_entryCorentin Chary
Some models work better with different values of wapf, so move the variable into quriks_entry to make it more easy to give a specific value to different models. Based on original patch from AceLan Kao <acelan.kao@canonical.com> Cc: AceLan Kao <acelan.kao@canonical.com> Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-26asus-wmi: add scalar board brightness adj. supportAceLan Kao
Some ASUS ET2012E/I All-in-One machines that use a scalar board to control the brightness, and they only accept brightness up and down command. So, I introduced a get_scalar_command() function to pass the command to the scalar board through WMI. Besides, we have to store the brightness value locally, for we need the old value to know the brightness value is increasing or decreasing. BTW, since there is no way to retrieve the actual brightness(it would be a fixed value), and the max brightness value would be fixed to 1, so we have to keep passing the brightness up/down command when we reached the max brightness value or 0. Signed-off-by: AceLan Kao <acelan.kao@canonical.com> Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-26asus-nb-wmi: ignore useless keysCorentin Chary
Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05asus-wmi: add CWAP support and clarify the meaning of WAPF bitsCorentin Chary
ref: http://dev.iksaif.net/projects/3/wiki/Asus-laptop_WAPF Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-03-28asus-nb-wmi: Asus Notebooks WMI DriverCorentin Chary
Introduce a new driver for Asus Notebooks shipped with a WMI device instead of the old ACPI device. The WMI device is almost the same as the one present in Eee PC, but the event guid and the keymap are different. The keymap comes from asus-laptop module. On Asus notebooks, when you call the WMI device, you always need a 64bit buffer, even if you only want to get the state of a device (tested on a G73). Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>