Re: [PATCH 2/5] asus-wmi: Create quirk for airplane_mode LED

From: JoÃo Paulo Rechi Vita
Date: Wed May 25 2016 - 12:20:59 EST


On 25 May 2016 at 03:13, Corentin Chary <corentin.chary@xxxxxxxxx> wrote:
> On Mon, Feb 8, 2016 at 6:05 PM, JoÃo Paulo Rechi Vita <jprvita@xxxxxxxxx> wrote:
>> 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. It also adds a match to that quirk for the Asus
>> X555UB.
>
> This is really something that should get merged, multiple users are
> affected by this. I do not own any of these laptops, but would there
> be a way to detect this behavior instead of having static quircks ?
>

I could not come up with a way to detect this, but I can probably
gather most (if not all) of the DSDTs if want to have a look at them.
In any case, I must say the asus-wireless patches that actually drive
the LED are still blocked on a couple of rfkill patches that implement
a new airplane-mode led trigger, which I'm trying to have merged for
the past two kernel releases. I can send a new series with only the
asus-wmi patches if you want to have them merged first, but in this
case the LED will not work (I imagine it will be always OFF) instead
of working in an inverted fashion. Just let me know!

Regards,

--
JoÃo Paulo Rechi Vita
http://about.me/jprvita