]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Sep 2025 09:16:53 +0000 (11:16 +0200)
commit1aa91f3d4f16201953c0184c2fcc9bc921a34e83
tree465c0ce5f5192f5fd02198033fb06bae673e3a2b
parent50a98ce1ea694f1ff8e87bc2f8f84096d1736f6a
platform/x86: asus-wmi: Fix ROG button mapping, tablet mode on ASUS ROG Z13

commit 132bfcd24925d4d4531a19b87acb8474be82a017 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/platform/x86/asus-nb-wmi.c
drivers/platform/x86/asus-wmi.h