]> www.infradead.org Git - users/jedix/linux-maple.git/commit
platform/x86: asus-wmi: Fix ROG button mapping, tablet mode on ASUS ROG Z13
authorAntheas Kapenekakis <lkml@antheas.dev>
Fri, 8 Aug 2025 15:47:10 +0000 (17:47 +0200)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 25 Aug 2025 11:13:55 +0000 (14:13 +0300)
commit132bfcd24925d4d4531a19b87acb8474be82a017
treeea24a14bad8ae48b5acce8f1b190679e0f1e1135
parentcf3940ac737d05c85395f343fe33a3cfcadb47db
platform/x86: asus-wmi: Fix ROG button mapping, tablet mode on ASUS ROG Z13

On commit 9286dfd5735b ("platform/x86: asus-wmi: Fix spurious rfkill on
UX8406MA"), Mathieu adds a quirk for the Zenbook Duo to ignore the code
0x5f (WLAN button disable). On that laptop, this code is triggered when
the device keyboard is attached.

On the ASUS ROG Z13 2025, this code is triggered when pressing the side
button of the device, which is used to open Armoury Crate in Windows.

As this is becoming a pattern, where newer Asus laptops use this keycode
for emitting events, let's convert the wlan ignore quirk to instead
allow emitting codes, so that userspace programs can listen to it and
so that it does not interfere with the rfkill state.

With this patch, the Z13 wil emit KEY_PROG3 and the Duo will remain
unchanged and emit no event. While at it, add a quirk for the Z13 to
switch into tablet mode when removing the keyboard.

Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
Link: https://lore.kernel.org/r/20250808154710.8981-2-lkml@antheas.dev
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/asus-nb-wmi.c
drivers/platform/x86/asus-wmi.h