platform/x86: asus-wmi: Fix spurious rfkill on UX8406MA
authorMathieu Fenniak <mathieu@fenniak.net>
Fri, 23 Aug 2024 13:56:28 +0000 (15:56 +0200)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 26 Aug 2024 11:34:00 +0000 (14:34 +0300)
commit9286dfd5735b9cceb6a14bdf15e13400ccb60fe7
tree60f1391aea61b15d624108269745e647215b3793
parenta24cd5cfd1d07712a9f192401af638e3c6cc1491
platform/x86: asus-wmi: Fix spurious rfkill on UX8406MA

The Asus Zenbook Duo (UX8406MA) has a keyboard which can be
placed on the laptop to connect it via USB, or can be removed from the
laptop to reveal a hidden secondary display in which case the keyboard
operates via Bluetooth.

When it is placed on the secondary display to connect via USB, it emits
a keypress for a wireless disable. This causes the rfkill system to be
activated disconnecting the current wifi connection, which doesn't
reflect the user's true intention.

Detect this hardware and suppress any wireless switches from the
keyboard; this keyboard does not have a wireless toggle capability so
these presses are always spurious.

Signed-off-by: Mathieu Fenniak <mathieu@fenniak.net>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20240823135630.128447-1-mathieu@fenniak.net
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/asus-nb-wmi.c
drivers/platform/x86/asus-wmi.h