All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 0/4] Asus Wireless Radio Control driver
@ 2015-12-15 15:30 João Paulo Rechi Vita
  2015-12-15 15:30 ` [PATCH 1/4] platform/x86: Add " João Paulo Rechi Vita
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: João Paulo Rechi Vita @ 2015-12-15 15:30 UTC (permalink / raw)
  To: Corentin Chary
  Cc: platform-driver-x86, acpi4asus-user, jprvita, João Paulo Rechi Vita

This series is a request for comments on the driver for the "Asus Wireless
Radio Control" device, as named on the vendor website, which handles
notifications from the airplane mode hotkey and drives the airplane mode
indicator LED. This device appears in the DSDT as "ASHS".

When the airplane mode hotkey is pressed a query 0x0B is started in the
Embedded Controller, and all this query does is a notify ASHS with the value
0x88. ASHS also has one method HSWC, which can drive the airplane mode LED and
query its status, according to its parameter.

To properly drive the LED a new RFKill trigger was implemented, to track the
global state of all RFKill switches in the system, and turn the LED ON when all
are blocked, and OFF otherwise. This code will have to go through review on
linux-wireless, but first I wanted to get feedback on the WRC driver itself.

There is one known issue: the airplane mode LED uses the same ID as the WLAN
LED in asus-wmi, so at the moment to have the LED being driven correctly by
asus-wrc I have to disable asus-wmi. Even with wapf=0, which does not register
a WLAN LED in asus-wmi, the conflict still occurs because
ASUS_WMI_DSTS_USER_BIT is set. Please advise on what is the best way to solve
this problem.

I've chosen to make this a separate module because this is a separate entry in
the DSDT, and checkpatch told me to add an entry in MAINTAINERS in this case.
Please let me know if any of this should have been done differently.

I have access to two Asus laptops which need this driver for the airplane mode
hotkey to work: E202SA (which does not have a LED) and X555UB (which have a
LED), and on https://bugzilla.kernel.org/show_bug.cgi?id=98931#c22 there is
report of a 3rd laptop that gets fixed with this driver. This should also fix
the mentioned bug report.

Regards,

Joao Paulo.

João Paulo Rechi Vita (4):
  platform/x86: Add Asus Wireless Radio Control driver
  asus-wrc: Add ACPI HID ATK4001
  net/rfkill: Create "airplane mode" LED trigger
  asus-wrc: Toggle airplane mode LED

 MAINTAINERS                     |   6 ++
 drivers/platform/x86/Kconfig    |  15 +++
 drivers/platform/x86/Makefile   |   1 +
 drivers/platform/x86/asus-wrc.c | 200 ++++++++++++++++++++++++++++++++++++++++
 net/rfkill/core.c               |  30 ++++++
 5 files changed, 252 insertions(+)
 create mode 100644 drivers/platform/x86/asus-wrc.c

-- 
2.5.0

^ permalink raw reply	[flat|nested] 17+ messages in thread
* [RFCv2 0/4] Asus Wireless Radio Control driver
@ 2015-12-26 14:56 João Paulo Rechi Vita
  2015-12-26 14:56 ` [PATCH 3/4] net/rfkill: Create "airplane mode" LED trigger João Paulo Rechi Vita
  0 siblings, 1 reply; 17+ messages in thread
From: João Paulo Rechi Vita @ 2015-12-26 14:56 UTC (permalink / raw)
  To: Darren Hart
  Cc: Corentin Chary, platform-driver-x86, acpi4asus-user,
	linux-kernel, João Paulo Rechi Vita

This is the 2nd RFC for the "Asus Wireless Radio Control" device, addressing
the comments on the previous RFC. The differences from the previous RFC are:

 - Generate input events accessing the input layer directly instead of using
   sparse_keymap, as this was considered overkill for a device which has only
   one event type.

 - Set the input device vendor id.

 - Clean-up the driver to make a little shorter: now the only extra bits
   comparing to Mousou's proposal is the "struct asus_wireless_data", which is
   used to keep all the driver's data (input device pointer, acpi device
   pointer and LEDs data).

 - Compile the driver as a module by default.

 - Select the necessary config options to compile the led_class subsystem when
   this driver is selected.

 - Change the module name from asus-wrc to asus-wireless.

Since I am currently travelling I did not have a chance to test this changes,
but I'll do so as soon as I get back to my home office on Jan 1st. I decided to
send this updated version anyway to get feedback since this can't be merged
until we have the airplane mode RFKill LED trigger merged in the wireless tree.
I'll also send that patch to linux-wireless for feedback and integration later
today.

Regards,

Joao Paulo

João Paulo Rechi Vita (4):
  platform/x86: Add Asus Wireless Radio Control driver
  asus-wireless: Add ACPI HID ATK4001
  net/rfkill: Create "airplane mode" LED trigger
  asus-wireless: Toggle airplane mode LED

 MAINTAINERS                          |   6 ++
 drivers/platform/x86/Kconfig         |  17 ++++
 drivers/platform/x86/Makefile        |   1 +
 drivers/platform/x86/asus-wireless.c | 187 +++++++++++++++++++++++++++++++++++
 net/rfkill/core.c                    |  30 ++++++
 5 files changed, 241 insertions(+)
 create mode 100644 drivers/platform/x86/asus-wireless.c

-- 
2.5.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2015-12-26 14:57 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-15 15:30 [RFC 0/4] Asus Wireless Radio Control driver João Paulo Rechi Vita
2015-12-15 15:30 ` [PATCH 1/4] platform/x86: Add " João Paulo Rechi Vita
2015-12-19  6:39   ` Darren Hart
     [not found]     ` <CA+A7VXWGTAsen2V29ifJ9nGCuHRnQnZi=Q_oEi1fkmeo=t1gxQ@mail.gmail.com>
2015-12-20 16:58       ` João Paulo Rechi Vita
2015-12-19  7:23   ` Darren Hart
     [not found]     ` <CA+A7VXU9MepWmWL6BS+XyjbLs2s_ONR5Yy3tqT--cbYS7p1P1Q@mail.gmail.com>
2015-12-20 17:00       ` João Paulo Rechi Vita
2015-12-15 15:30 ` [PATCH 2/4] asus-wrc: Add ACPI HID ATK4001 João Paulo Rechi Vita
2015-12-19  6:40   ` Darren Hart
2015-12-20 18:57     ` João Paulo Rechi Vita
2015-12-15 15:30 ` [PATCH 3/4] net/rfkill: Create "airplane mode" LED trigger João Paulo Rechi Vita
2015-12-19  0:22   ` Darren Hart
2015-12-19  0:36     ` João Paulo Rechi Vita
2015-12-19  2:25     ` David Miller
2015-12-15 15:30 ` [PATCH 4/4] asus-wrc: Toggle airplane mode LED João Paulo Rechi Vita
2015-12-19  8:00 ` [RFC 0/4] Asus Wireless Radio Control driver Darren Hart
2015-12-20 19:01   ` João Paulo Rechi Vita
2015-12-26 14:56 [RFCv2 " João Paulo Rechi Vita
2015-12-26 14:56 ` [PATCH 3/4] net/rfkill: Create "airplane mode" LED trigger João Paulo Rechi Vita

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.