]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
platform/x86: asus-wmi: Detect quirk_no_rfkill from the DSDT
authorJoão Paulo Rechi Vita <jprvita@gmail.com>
Mon, 20 Feb 2017 19:50:22 +0000 (14:50 -0500)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Sun, 26 Feb 2017 15:01:48 +0000 (17:01 +0200)
commit71050ae7bf83e4d71a859257d11adc5de517073e
tree2483e8e647537b83b915d60e3da9abf2ca2f24e1
parent5802d0bc3fe9f598f0ff3f5fd7fd8c5c935a1b5d
platform/x86: asus-wmi: Detect quirk_no_rfkill from the DSDT

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 skips registering RFKill switches at all for these laptops,
to allow the asus-wireless driver to drive the airplane mode LED
correctly through the ASHS ACPI device. Relying on the presence of ASHS
and ASUS_WMI_DSTS_USER_BIT avoids adding DMI-based quirks for at least
21 different laptops.

Signed-off-by: João Paulo Rechi Vita <jprvita@endlessm.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/asus-wmi.c