summaryrefslogtreecommitdiff
path: root/drivers/platform/x86/asus-nb-wmi.c
diff options
context:
space:
mode:
authorJoão Paulo Rechi Vita <jprvita@gmail.com>2016-06-13 23:57:30 +0300
committerDarren Hart <dvhart@linux.intel.com>2016-07-02 02:01:26 +0300
commit2c1a49c961237ed8758af3188673b0e9a8826ac6 (patch)
tree00da181b507b503382ca8d0531eaa87cbad1f89e /drivers/platform/x86/asus-nb-wmi.c
parent08a245160bce8b3d044fa0fdac9ca099bd720706 (diff)
downloadlinux-2c1a49c961237ed8758af3188673b0e9a8826ac6.tar.xz
asus-wireless: Toggle airplane mode LED
In the ASHS device we have the HSWC method, which calls either OWGD or OWGS, depending on its parameter: Device (ASHS) { Name (_HID, "ATK4002") // _HID: Hardware ID Method (HSWC, 1, Serialized) { If ((Arg0 < 0x02)) { OWGD (Arg0) Return (One) } If ((Arg0 == 0x02)) { Local0 = OWGS () If (Local0) { Return (0x05) } Else { Return (0x04) } } If ((Arg0 == 0x03)) { Return (0xFF) } If ((Arg0 == 0x04)) { OWGD (Zero) Return (One) } If ((Arg0 == 0x05)) { OWGD (One) Return (One) } If ((Arg0 == 0x80)) { Return (One) } } Method (_STA, 0, NotSerialized) // _STA: Status { If ((MSOS () >= OSW8)) { Return (0x0F) } Else { Return (Zero) } } } On the Asus laptops that do not have an airplane mode LED, OWGD has an empty implementation and OWGS simply returns 0. On the ones that have an airplane mode LED these methods have the following implementation: Method (OWGD, 1, Serialized) { SGPL (0x0203000F, Arg0) SGPL (0x0203000F, Arg0) } Method (OWGS, 0, Serialized) { Store (RGPL (0x0203000F), Local0) Return (Local0) } Where OWGD(1) sets the airplane mode LED ON, OWGD(0) set it off, and OWGS() returns its state. This commit exposes the airplane mode indicator LED to userspace under the name asus-wireless::airplane, so it can be driven according to userspace's policy. 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')
0 files changed, 0 insertions, 0 deletions