summaryrefslogtreecommitdiff
path: root/drivers/platform/x86/Kconfig
diff options
context:
space:
mode:
authorJoão Paulo Rechi Vita <jprvita@gmail.com>2016-06-13 16:57:30 -0400
committerDarren Hart <dvhart@linux.intel.com>2016-07-01 16:01:26 -0700
commit2c1a49c961237ed8758af3188673b0e9a8826ac6 (patch)
tree00da181b507b503382ca8d0531eaa87cbad1f89e /drivers/platform/x86/Kconfig
parent08a245160bce8b3d044fa0fdac9ca099bd720706 (diff)
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/Kconfig')
-rw-r--r--drivers/platform/x86/Kconfig2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 633fc5c191fc..b0b98e413343 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -604,6 +604,8 @@ config ASUS_WIRELESS
tristate "Asus Wireless Radio Control Driver"
depends on ACPI
depends on INPUT
+ select NEW_LEDS
+ select LEDS_CLASS
---help---
The Asus Wireless Radio Control handles the airplane mode hotkey
present on some Asus laptops.