2011-02-26 17:20:40 +08:00
|
|
|
/*
|
|
|
|
* Asus Notebooks WMI hotkey driver
|
|
|
|
*
|
|
|
|
* Copyright(C) 2010 Corentin Chary <corentin.chary@gmail.com>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
|
|
|
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/module.h>
|
|
|
|
#include <linux/init.h>
|
|
|
|
#include <linux/input.h>
|
|
|
|
#include <linux/input/sparse-keymap.h>
|
2012-03-20 16:53:11 +08:00
|
|
|
#include <linux/fb.h>
|
asus-nb-wmi: add wapf quirk for ASUS machines
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-07-04 11:19:08 +08:00
|
|
|
#include <linux/dmi.h>
|
platform/x86: asus-wmi: Filter buggy scan codes on ASUS Q500A
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-12 23:48:17 +08:00
|
|
|
#include <linux/i8042.h>
|
2011-02-26 17:20:40 +08:00
|
|
|
|
|
|
|
#include "asus-wmi.h"
|
|
|
|
|
|
|
|
#define ASUS_NB_WMI_FILE "asus-nb-wmi"
|
|
|
|
|
2012-12-18 08:00:05 +08:00
|
|
|
MODULE_AUTHOR("Corentin Chary <corentin.chary@gmail.com>");
|
2011-02-26 17:20:40 +08:00
|
|
|
MODULE_DESCRIPTION("Asus Notebooks WMI Hotkey Driver");
|
|
|
|
MODULE_LICENSE("GPL");
|
|
|
|
|
|
|
|
#define ASUS_NB_WMI_EVENT_GUID "0B3CBB35-E3C2-45ED-91C2-4C5A6D195D1C"
|
|
|
|
|
|
|
|
MODULE_ALIAS("wmi:"ASUS_NB_WMI_EVENT_GUID);
|
|
|
|
|
2011-07-01 17:34:39 +08:00
|
|
|
/*
|
|
|
|
* WAPF defines the behavior of the Fn+Fx wlan key
|
|
|
|
* The significance of values is yet to be found, but
|
|
|
|
* most of the time:
|
|
|
|
* Bit | Bluetooth | WLAN
|
|
|
|
* 0 | Hardware | Hardware
|
|
|
|
* 1 | Hardware | Software
|
|
|
|
* 4 | Software | Software
|
|
|
|
*/
|
asus-nb-wmi: add wapf quirk for ASUS machines
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-07-04 11:19:08 +08:00
|
|
|
static int wapf = -1;
|
2011-07-01 17:34:39 +08:00
|
|
|
module_param(wapf, uint, 0444);
|
|
|
|
MODULE_PARM_DESC(wapf, "WAPF value");
|
|
|
|
|
asus-nb-wmi: add wapf quirk for ASUS machines
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-07-04 11:19:08 +08:00
|
|
|
static struct quirk_entry *quirks;
|
|
|
|
|
platform/x86: asus-wmi: Filter buggy scan codes on ASUS Q500A
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-12 23:48:17 +08:00
|
|
|
static bool asus_q500a_i8042_filter(unsigned char data, unsigned char str,
|
|
|
|
struct serio *port)
|
|
|
|
{
|
|
|
|
static bool extended;
|
|
|
|
bool ret = false;
|
|
|
|
|
|
|
|
if (str & I8042_STR_AUXDATA)
|
|
|
|
return false;
|
|
|
|
|
|
|
|
if (unlikely(data == 0xe1)) {
|
|
|
|
extended = true;
|
|
|
|
ret = true;
|
|
|
|
} else if (unlikely(extended)) {
|
|
|
|
extended = false;
|
|
|
|
ret = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2012-03-20 16:53:10 +08:00
|
|
|
static struct quirk_entry quirk_asus_unknown = {
|
asus-nb-wmi: add wapf quirk for ASUS machines
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-07-04 11:19:08 +08:00
|
|
|
.wapf = 0,
|
|
|
|
};
|
|
|
|
|
platform/x86: asus-wmi: Filter buggy scan codes on ASUS Q500A
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-12 23:48:17 +08:00
|
|
|
static struct quirk_entry quirk_asus_q500a = {
|
|
|
|
.i8042_filter = asus_q500a_i8042_filter,
|
|
|
|
};
|
|
|
|
|
asus-wmi: add display toggle quirk
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>
2012-10-03 17:26:31 +08:00
|
|
|
/*
|
|
|
|
* For those machines that need software to control bt/wifi status
|
|
|
|
* and can't adjust brightness through ACPI interface
|
|
|
|
* and have duplicate events(ACPI and WMI) for display toggle
|
|
|
|
*/
|
|
|
|
static struct quirk_entry quirk_asus_x55u = {
|
|
|
|
.wapf = 4,
|
|
|
|
.wmi_backlight_power = true,
|
|
|
|
.no_display_toggle = true,
|
|
|
|
};
|
|
|
|
|
2014-07-14 15:14:34 +08:00
|
|
|
static struct quirk_entry quirk_asus_wapf4 = {
|
asus-nb-wmi: add wapf quirk for ASUS machines
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-07-04 11:19:08 +08:00
|
|
|
.wapf = 4,
|
|
|
|
};
|
|
|
|
|
2014-07-09 16:18:19 +08:00
|
|
|
static struct quirk_entry quirk_asus_x200ca = {
|
|
|
|
.wapf = 2,
|
|
|
|
};
|
|
|
|
|
2016-06-14 04:57:31 +08:00
|
|
|
static struct quirk_entry quirk_no_rfkill = {
|
|
|
|
.no_rfkill = true,
|
|
|
|
};
|
|
|
|
|
2016-06-14 04:57:35 +08:00
|
|
|
static struct quirk_entry quirk_no_rfkill_wapf4 = {
|
|
|
|
.wapf = 4,
|
|
|
|
.no_rfkill = true,
|
|
|
|
};
|
|
|
|
|
2016-08-28 16:12:06 +08:00
|
|
|
static struct quirk_entry quirk_asus_ux303ub = {
|
|
|
|
.wmi_backlight_native = true,
|
|
|
|
};
|
|
|
|
|
asus-nb-wmi: add wapf quirk for ASUS machines
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-07-04 11:19:08 +08:00
|
|
|
static int dmi_matched(const struct dmi_system_id *dmi)
|
|
|
|
{
|
|
|
|
quirks = dmi->driver_data;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2014-07-17 01:43:08 +08:00
|
|
|
static const struct dmi_system_id asus_quirks[] = {
|
platform/x86: asus-wmi: Filter buggy scan codes on ASUS Q500A
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-12 23:48:17 +08:00
|
|
|
{
|
|
|
|
.callback = dmi_matched,
|
|
|
|
.ident = "ASUSTeK COMPUTER INC. Q500A",
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "Q500A"),
|
|
|
|
},
|
|
|
|
.driver_data = &quirk_asus_q500a,
|
|
|
|
},
|
2014-07-29 17:59:57 +08:00
|
|
|
{
|
|
|
|
.callback = dmi_matched,
|
|
|
|
.ident = "ASUSTeK COMPUTER INC. U32U",
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "U32U"),
|
|
|
|
},
|
|
|
|
/*
|
|
|
|
* Note this machine has a Brazos APU, and most Brazos Asus
|
|
|
|
* machines need quirk_asus_x55u / wmi_backlight_power but
|
|
|
|
* here acpi-video seems to work fine for backlight control.
|
|
|
|
*/
|
|
|
|
.driver_data = &quirk_asus_wapf4,
|
|
|
|
},
|
asus-nb-wmi: add wapf quirk for ASUS machines
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-07-04 11:19:08 +08:00
|
|
|
{
|
|
|
|
.callback = dmi_matched,
|
|
|
|
.ident = "ASUSTeK COMPUTER INC. X401U",
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "X401U"),
|
|
|
|
},
|
asus-wmi: add display toggle quirk
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>
2012-10-03 17:26:31 +08:00
|
|
|
.driver_data = &quirk_asus_x55u,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = dmi_matched,
|
|
|
|
.ident = "ASUSTeK COMPUTER INC. X401A",
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "X401A"),
|
|
|
|
},
|
2014-07-14 15:14:34 +08:00
|
|
|
.driver_data = &quirk_asus_wapf4,
|
asus-nb-wmi: add wapf quirk for ASUS machines
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-07-04 11:19:08 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = dmi_matched,
|
|
|
|
.ident = "ASUSTeK COMPUTER INC. X401A1",
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "X401A1"),
|
|
|
|
},
|
2014-07-14 15:14:34 +08:00
|
|
|
.driver_data = &quirk_asus_wapf4,
|
asus-nb-wmi: add wapf quirk for ASUS machines
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-07-04 11:19:08 +08:00
|
|
|
},
|
2015-09-03 06:10:34 +08:00
|
|
|
{
|
|
|
|
.callback = dmi_matched,
|
|
|
|
.ident = "ASUSTeK COMPUTER INC. X456UA",
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "X456UA"),
|
|
|
|
},
|
2016-06-14 04:57:36 +08:00
|
|
|
.driver_data = &quirk_no_rfkill_wapf4,
|
2015-09-03 06:10:34 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = dmi_matched,
|
|
|
|
.ident = "ASUSTeK COMPUTER INC. X456UF",
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "X456UF"),
|
|
|
|
},
|
2016-06-14 04:57:35 +08:00
|
|
|
.driver_data = &quirk_no_rfkill_wapf4,
|
2015-09-03 06:10:34 +08:00
|
|
|
},
|
asus-nb-wmi: add wapf quirk for ASUS machines
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-07-04 11:19:08 +08:00
|
|
|
{
|
|
|
|
.callback = dmi_matched,
|
|
|
|
.ident = "ASUSTeK COMPUTER INC. X501U",
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "X501U"),
|
|
|
|
},
|
asus-wmi: add display toggle quirk
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>
2012-10-03 17:26:31 +08:00
|
|
|
.driver_data = &quirk_asus_x55u,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = dmi_matched,
|
|
|
|
.ident = "ASUSTeK COMPUTER INC. X501A",
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "X501A"),
|
|
|
|
},
|
2014-07-14 15:14:34 +08:00
|
|
|
.driver_data = &quirk_asus_wapf4,
|
asus-nb-wmi: add wapf quirk for ASUS machines
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-07-04 11:19:08 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = dmi_matched,
|
|
|
|
.ident = "ASUSTeK COMPUTER INC. X501A1",
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "X501A1"),
|
|
|
|
},
|
2014-07-14 15:14:34 +08:00
|
|
|
.driver_data = &quirk_asus_wapf4,
|
asus-nb-wmi: add wapf quirk for ASUS machines
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-07-04 11:19:08 +08:00
|
|
|
},
|
2014-05-07 04:27:45 +08:00
|
|
|
{
|
|
|
|
.callback = dmi_matched,
|
|
|
|
.ident = "ASUSTeK COMPUTER INC. X550CA",
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "X550CA"),
|
|
|
|
},
|
2014-07-14 15:14:34 +08:00
|
|
|
.driver_data = &quirk_asus_wapf4,
|
2014-05-07 04:27:45 +08:00
|
|
|
},
|
2014-07-18 18:15:09 +08:00
|
|
|
{
|
|
|
|
.callback = dmi_matched,
|
|
|
|
.ident = "ASUSTeK COMPUTER INC. X550CC",
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "X550CC"),
|
|
|
|
},
|
|
|
|
.driver_data = &quirk_asus_wapf4,
|
|
|
|
},
|
2014-07-14 15:14:35 +08:00
|
|
|
{
|
|
|
|
.callback = dmi_matched,
|
|
|
|
.ident = "ASUSTeK COMPUTER INC. X550CL",
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "X550CL"),
|
|
|
|
},
|
|
|
|
.driver_data = &quirk_asus_wapf4,
|
|
|
|
},
|
2014-10-26 18:23:55 +08:00
|
|
|
{
|
|
|
|
.callback = dmi_matched,
|
|
|
|
.ident = "ASUSTeK COMPUTER INC. X550VB",
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "X550VB"),
|
|
|
|
},
|
|
|
|
.driver_data = &quirk_asus_wapf4,
|
|
|
|
},
|
2014-11-24 18:26:32 +08:00
|
|
|
{
|
|
|
|
.callback = dmi_matched,
|
|
|
|
.ident = "ASUSTeK COMPUTER INC. X551CA",
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "X551CA"),
|
|
|
|
},
|
|
|
|
.driver_data = &quirk_asus_wapf4,
|
|
|
|
},
|
asus-nb-wmi: add wapf quirk for ASUS machines
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-07-04 11:19:08 +08:00
|
|
|
{
|
|
|
|
.callback = dmi_matched,
|
|
|
|
.ident = "ASUSTeK COMPUTER INC. X55A",
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "X55A"),
|
|
|
|
},
|
2014-07-14 15:14:34 +08:00
|
|
|
.driver_data = &quirk_asus_wapf4,
|
asus-nb-wmi: add wapf quirk for ASUS machines
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-07-04 11:19:08 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = dmi_matched,
|
|
|
|
.ident = "ASUSTeK COMPUTER INC. X55C",
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "X55C"),
|
|
|
|
},
|
2014-07-14 15:14:34 +08:00
|
|
|
.driver_data = &quirk_asus_wapf4,
|
asus-nb-wmi: add wapf quirk for ASUS machines
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-07-04 11:19:08 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = dmi_matched,
|
|
|
|
.ident = "ASUSTeK COMPUTER INC. X55U",
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "X55U"),
|
|
|
|
},
|
asus-wmi: add display toggle quirk
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>
2012-10-03 17:26:31 +08:00
|
|
|
.driver_data = &quirk_asus_x55u,
|
asus-nb-wmi: add wapf quirk for ASUS machines
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-07-04 11:19:08 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = dmi_matched,
|
|
|
|
.ident = "ASUSTeK COMPUTER INC. X55VD",
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "X55VD"),
|
|
|
|
},
|
2014-07-14 15:14:34 +08:00
|
|
|
.driver_data = &quirk_asus_wapf4,
|
2013-04-25 15:11:07 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = dmi_matched,
|
|
|
|
.ident = "ASUSTeK COMPUTER INC. X75A",
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "X75A"),
|
|
|
|
},
|
2014-07-14 15:14:34 +08:00
|
|
|
.driver_data = &quirk_asus_wapf4,
|
asus-nb-wmi: add wapf quirk for ASUS machines
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-07-04 11:19:08 +08:00
|
|
|
},
|
2014-05-07 04:03:38 +08:00
|
|
|
{
|
|
|
|
.callback = dmi_matched,
|
|
|
|
.ident = "ASUSTeK COMPUTER INC. X75VBP",
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "X75VBP"),
|
|
|
|
},
|
2014-07-14 15:14:34 +08:00
|
|
|
.driver_data = &quirk_asus_wapf4,
|
2014-05-07 04:03:38 +08:00
|
|
|
},
|
2016-02-17 19:35:46 +08:00
|
|
|
{
|
|
|
|
.callback = dmi_matched,
|
|
|
|
.ident = "ASUSTeK COMPUTER INC. X75VD",
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "X75VD"),
|
|
|
|
},
|
|
|
|
.driver_data = &quirk_asus_wapf4,
|
|
|
|
},
|
2013-07-03 14:35:15 +08:00
|
|
|
{
|
|
|
|
.callback = dmi_matched,
|
|
|
|
.ident = "ASUSTeK COMPUTER INC. 1015E",
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "1015E"),
|
|
|
|
},
|
2014-07-14 15:14:34 +08:00
|
|
|
.driver_data = &quirk_asus_wapf4,
|
2013-07-03 14:35:15 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = dmi_matched,
|
|
|
|
.ident = "ASUSTeK COMPUTER INC. 1015U",
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "1015U"),
|
|
|
|
},
|
2014-07-14 15:14:34 +08:00
|
|
|
.driver_data = &quirk_asus_wapf4,
|
2013-07-03 14:35:15 +08:00
|
|
|
},
|
2014-07-09 16:18:19 +08:00
|
|
|
{
|
|
|
|
.callback = dmi_matched,
|
|
|
|
.ident = "ASUSTeK COMPUTER INC. X200CA",
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "X200CA"),
|
|
|
|
},
|
|
|
|
.driver_data = &quirk_asus_x200ca,
|
|
|
|
},
|
2016-06-14 04:57:31 +08:00
|
|
|
{
|
|
|
|
.callback = dmi_matched,
|
|
|
|
.ident = "ASUSTeK COMPUTER INC. X555UB",
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "X555UB"),
|
|
|
|
},
|
|
|
|
.driver_data = &quirk_no_rfkill,
|
|
|
|
},
|
2016-06-14 04:57:32 +08:00
|
|
|
{
|
|
|
|
.callback = dmi_matched,
|
|
|
|
.ident = "ASUSTeK COMPUTER INC. N552VW",
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "N552VW"),
|
|
|
|
},
|
|
|
|
.driver_data = &quirk_no_rfkill,
|
|
|
|
},
|
2016-06-14 04:57:33 +08:00
|
|
|
{
|
|
|
|
.callback = dmi_matched,
|
|
|
|
.ident = "ASUSTeK COMPUTER INC. U303LB",
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "U303LB"),
|
|
|
|
},
|
|
|
|
.driver_data = &quirk_no_rfkill,
|
|
|
|
},
|
2016-06-14 04:57:34 +08:00
|
|
|
{
|
|
|
|
.callback = dmi_matched,
|
|
|
|
.ident = "ASUSTeK COMPUTER INC. Z550MA",
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "Z550MA"),
|
|
|
|
},
|
|
|
|
.driver_data = &quirk_no_rfkill,
|
|
|
|
},
|
2016-08-28 16:12:06 +08:00
|
|
|
{
|
|
|
|
.callback = dmi_matched,
|
|
|
|
.ident = "ASUSTeK COMPUTER INC. UX303UB",
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "UX303UB"),
|
|
|
|
},
|
|
|
|
.driver_data = &quirk_asus_ux303ub,
|
|
|
|
},
|
asus-nb-wmi: add wapf quirk for ASUS machines
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-07-04 11:19:08 +08:00
|
|
|
{},
|
2012-03-20 16:53:10 +08:00
|
|
|
};
|
|
|
|
|
2011-07-01 17:34:39 +08:00
|
|
|
static void asus_nb_wmi_quirks(struct asus_wmi_driver *driver)
|
|
|
|
{
|
platform/x86: asus-wmi: Filter buggy scan codes on ASUS Q500A
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-12 23:48:17 +08:00
|
|
|
int ret;
|
|
|
|
|
asus-nb-wmi: add wapf quirk for ASUS machines
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-07-04 11:19:08 +08:00
|
|
|
quirks = &quirk_asus_unknown;
|
|
|
|
dmi_check_system(asus_quirks);
|
|
|
|
|
|
|
|
driver->quirks = quirks;
|
2012-03-20 16:53:11 +08:00
|
|
|
driver->panel_power = FB_BLANK_UNBLANK;
|
asus-nb-wmi: add wapf quirk for ASUS machines
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-07-04 11:19:08 +08:00
|
|
|
|
|
|
|
/* overwrite the wapf setting if the wapf paramater is specified */
|
|
|
|
if (wapf != -1)
|
|
|
|
quirks->wapf = wapf;
|
|
|
|
else
|
|
|
|
wapf = quirks->wapf;
|
platform/x86: asus-wmi: Filter buggy scan codes on ASUS Q500A
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-12 23:48:17 +08:00
|
|
|
|
|
|
|
if (quirks->i8042_filter) {
|
|
|
|
ret = i8042_install_filter(quirks->i8042_filter);
|
|
|
|
if (ret) {
|
|
|
|
pr_warn("Unable to install key filter\n");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
pr_info("Using i8042 filter function for receiving events\n");
|
|
|
|
}
|
2011-07-01 17:34:39 +08:00
|
|
|
}
|
|
|
|
|
2011-02-26 17:20:40 +08:00
|
|
|
static const struct key_entry asus_nb_wmi_keymap[] = {
|
2012-11-29 16:12:38 +08:00
|
|
|
{ KE_KEY, ASUS_WMI_BRN_DOWN, { KEY_BRIGHTNESSDOWN } },
|
|
|
|
{ KE_KEY, ASUS_WMI_BRN_UP, { KEY_BRIGHTNESSUP } },
|
2011-02-26 17:20:40 +08:00
|
|
|
{ KE_KEY, 0x30, { KEY_VOLUMEUP } },
|
|
|
|
{ KE_KEY, 0x31, { KEY_VOLUMEDOWN } },
|
|
|
|
{ KE_KEY, 0x32, { KEY_MUTE } },
|
|
|
|
{ KE_KEY, 0x33, { KEY_DISPLAYTOGGLE } }, /* LCD on */
|
|
|
|
{ KE_KEY, 0x34, { KEY_DISPLAY_OFF } }, /* LCD off */
|
|
|
|
{ KE_KEY, 0x40, { KEY_PREVIOUSSONG } },
|
|
|
|
{ KE_KEY, 0x41, { KEY_NEXTSONG } },
|
2012-10-03 17:26:26 +08:00
|
|
|
{ KE_KEY, 0x43, { KEY_STOPCD } }, /* Stop/Eject */
|
2011-02-26 17:20:40 +08:00
|
|
|
{ KE_KEY, 0x45, { KEY_PLAYPAUSE } },
|
2012-10-03 17:26:26 +08:00
|
|
|
{ KE_KEY, 0x4c, { KEY_MEDIA } }, /* WMP Key */
|
2011-02-26 17:20:40 +08:00
|
|
|
{ KE_KEY, 0x50, { KEY_EMAIL } },
|
|
|
|
{ KE_KEY, 0x51, { KEY_WWW } },
|
|
|
|
{ KE_KEY, 0x55, { KEY_CALC } },
|
2012-03-20 16:53:02 +08:00
|
|
|
{ KE_IGNORE, 0x57, }, /* Battery mode */
|
|
|
|
{ KE_IGNORE, 0x58, }, /* AC mode */
|
2011-02-26 17:20:40 +08:00
|
|
|
{ KE_KEY, 0x5C, { KEY_F15 } }, /* Power Gear key */
|
2011-07-01 17:34:39 +08:00
|
|
|
{ KE_KEY, 0x5D, { KEY_WLAN } }, /* Wireless console Toggle */
|
|
|
|
{ KE_KEY, 0x5E, { KEY_WLAN } }, /* Wireless console Enable */
|
|
|
|
{ KE_KEY, 0x5F, { KEY_WLAN } }, /* Wireless console Disable */
|
2012-10-03 17:26:29 +08:00
|
|
|
{ KE_KEY, 0x60, { KEY_TOUCHPAD_ON } },
|
2012-10-03 17:26:30 +08:00
|
|
|
{ KE_KEY, 0x61, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD only */
|
|
|
|
{ KE_KEY, 0x62, { KEY_SWITCHVIDEOMODE } }, /* SDSP CRT only */
|
|
|
|
{ KE_KEY, 0x63, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + CRT */
|
|
|
|
{ KE_KEY, 0x64, { KEY_SWITCHVIDEOMODE } }, /* SDSP TV */
|
|
|
|
{ KE_KEY, 0x65, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + TV */
|
|
|
|
{ KE_KEY, 0x66, { KEY_SWITCHVIDEOMODE } }, /* SDSP CRT + TV */
|
|
|
|
{ KE_KEY, 0x67, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + CRT + TV */
|
2011-02-26 17:20:40 +08:00
|
|
|
{ KE_KEY, 0x6B, { KEY_TOUCHPAD_TOGGLE } },
|
2012-10-03 17:26:25 +08:00
|
|
|
{ KE_IGNORE, 0x6E, }, /* Low Battery notification */
|
2016-06-19 19:59:26 +08:00
|
|
|
{ KE_KEY, 0x7a, { KEY_ALS_TOGGLE } }, /* Ambient Light Sensor Toggle */
|
2012-10-03 17:26:26 +08:00
|
|
|
{ KE_KEY, 0x7D, { KEY_BLUETOOTH } }, /* Bluetooth Enable */
|
|
|
|
{ KE_KEY, 0x7E, { KEY_BLUETOOTH } }, /* Bluetooth Disable */
|
2011-02-26 17:20:40 +08:00
|
|
|
{ KE_KEY, 0x82, { KEY_CAMERA } },
|
2012-10-03 17:26:26 +08:00
|
|
|
{ KE_KEY, 0x88, { KEY_RFKILL } }, /* Radio Toggle Key */
|
|
|
|
{ KE_KEY, 0x8A, { KEY_PROG1 } }, /* Color enhancement mode */
|
2012-10-03 17:26:30 +08:00
|
|
|
{ KE_KEY, 0x8C, { KEY_SWITCHVIDEOMODE } }, /* SDSP DVI only */
|
|
|
|
{ KE_KEY, 0x8D, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + DVI */
|
|
|
|
{ KE_KEY, 0x8E, { KEY_SWITCHVIDEOMODE } }, /* SDSP CRT + DVI */
|
|
|
|
{ KE_KEY, 0x8F, { KEY_SWITCHVIDEOMODE } }, /* SDSP TV + DVI */
|
|
|
|
{ KE_KEY, 0x90, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + CRT + DVI */
|
|
|
|
{ KE_KEY, 0x91, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + TV + DVI */
|
|
|
|
{ KE_KEY, 0x92, { KEY_SWITCHVIDEOMODE } }, /* SDSP CRT + TV + DVI */
|
|
|
|
{ KE_KEY, 0x93, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + CRT + TV + DVI */
|
2011-02-26 17:20:40 +08:00
|
|
|
{ KE_KEY, 0x95, { KEY_MEDIA } },
|
|
|
|
{ KE_KEY, 0x99, { KEY_PHONE } },
|
2012-07-04 15:20:14 +08:00
|
|
|
{ KE_KEY, 0xA0, { KEY_SWITCHVIDEOMODE } }, /* SDSP HDMI only */
|
|
|
|
{ KE_KEY, 0xA1, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + HDMI */
|
|
|
|
{ KE_KEY, 0xA2, { KEY_SWITCHVIDEOMODE } }, /* SDSP CRT + HDMI */
|
|
|
|
{ KE_KEY, 0xA3, { KEY_SWITCHVIDEOMODE } }, /* SDSP TV + HDMI */
|
2012-10-03 17:26:30 +08:00
|
|
|
{ KE_KEY, 0xA4, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + CRT + HDMI */
|
|
|
|
{ KE_KEY, 0xA5, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + TV + HDMI */
|
|
|
|
{ KE_KEY, 0xA6, { KEY_SWITCHVIDEOMODE } }, /* SDSP CRT + TV + HDMI */
|
|
|
|
{ KE_KEY, 0xA7, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + CRT + TV + HDMI */
|
2012-10-03 17:26:26 +08:00
|
|
|
{ KE_KEY, 0xB5, { KEY_CALC } },
|
|
|
|
{ KE_KEY, 0xC4, { KEY_KBDILLUMUP } },
|
|
|
|
{ KE_KEY, 0xC5, { KEY_KBDILLUMDOWN } },
|
2013-05-23 12:17:11 +08:00
|
|
|
{ KE_IGNORE, 0xC6, }, /* Ambient Light Sensor notification */
|
2011-02-26 17:20:40 +08:00
|
|
|
{ KE_END, 0},
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct asus_wmi_driver asus_nb_wmi_driver = {
|
|
|
|
.name = ASUS_NB_WMI_FILE,
|
|
|
|
.owner = THIS_MODULE,
|
|
|
|
.event_guid = ASUS_NB_WMI_EVENT_GUID,
|
|
|
|
.keymap = asus_nb_wmi_keymap,
|
|
|
|
.input_name = "Asus WMI hotkeys",
|
|
|
|
.input_phys = ASUS_NB_WMI_FILE "/input0",
|
2012-03-20 16:53:08 +08:00
|
|
|
.detect_quirks = asus_nb_wmi_quirks,
|
2011-02-26 17:20:40 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
static int __init asus_nb_wmi_init(void)
|
|
|
|
{
|
|
|
|
return asus_wmi_register_driver(&asus_nb_wmi_driver);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void __exit asus_nb_wmi_exit(void)
|
|
|
|
{
|
|
|
|
asus_wmi_unregister_driver(&asus_nb_wmi_driver);
|
|
|
|
}
|
|
|
|
|
|
|
|
module_init(asus_nb_wmi_init);
|
|
|
|
module_exit(asus_nb_wmi_exit);
|