diff options
author | João Paulo Rechi Vita <jprvita@gmail.com> | 2016-06-13 23:57:31 +0300 |
---|---|---|
committer | Darren Hart <dvhart@linux.intel.com> | 2016-07-02 02:01:40 +0300 |
commit | a977e59c0c67c9d492bb16677ce66d67cae0ebd8 (patch) | |
tree | ac1160bc21431a555bf85f594d24cabdeb0ce4bc /drivers/platform/x86/asus-nb-wmi.c | |
parent | 2c1a49c961237ed8758af3188673b0e9a8826ac6 (diff) | |
download | linux-a977e59c0c67c9d492bb16677ce66d67cae0ebd8.tar.xz |
asus-wmi: Create quirk for airplane_mode LED
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>
Diffstat (limited to 'drivers/platform/x86/asus-nb-wmi.c')
-rw-r--r-- | drivers/platform/x86/asus-nb-wmi.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c index 096ceba011a0..99992f46188e 100644 --- a/drivers/platform/x86/asus-nb-wmi.c +++ b/drivers/platform/x86/asus-nb-wmi.c @@ -78,6 +78,10 @@ static struct quirk_entry quirk_asus_x200ca = { .wapf = 2, }; +static struct quirk_entry quirk_no_rfkill = { + .no_rfkill = true, +}; + static int dmi_matched(const struct dmi_system_id *dmi) { quirks = dmi->driver_data; @@ -306,6 +310,15 @@ static const struct dmi_system_id asus_quirks[] = { }, .driver_data = &quirk_asus_x200ca, }, + { + .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, + }, {}, }; |