platform/x86: asus-wmi: add keystone dongle support
PATCH v3 1/1 platform/x86: asus-wmi: add keystone dongle support
The ASUS Keystone is a physical NFC-like dongle that slots into supported ASUS laptops. The EC fires WMI notify code 0xB4 on insert/remove events.
Expose the current insert state via a sysfs attribute by querying WMI device ID 0x00120091 (DSTS). This devid does not follow the standard DSTS
convention: PRESENCE_BIT (0x00010000) encodes the insert state rather than feature presence, and STATUS_BIT is never set. Presence of a keystone slot is detected by a successful DSTS call.
---
Changes in v2:
- Use .is_visible and platform_attributes[] instead of device_create_file/device_remove_file (Ilpo Järvinen)
Changes in v3:
- Add interface documentation (Ilpo Järvinen)
.../ABI/testing/sysfs-platform-asus-wmi | 9 +++ drivers/platform/x86/asus-wmi.c | 65 +++++++++++++++++++ include/linux/platform_data/x86/asus-wmi.h | 7 ++ 3 files changed, 81 insertions(+)
Documentation/ABI/testing/sysfs-platform-asus-wmi +9 -0
@@ -58,6 +58,15 @@ Description: * 1 - overboost, * 2 - silent +What: /sys/devices/platform/<platform>/keystone +Date: Jun 2026 +KernelVersion: 7.2 +Contact: "Dariusz Figzał" <[email protected]> +Description: + Reports the Keystone dongle insert state (read-only): + * 0 - not inserted + * 1 - inserted + What: /sys/devices/platform/<platform>/gpu_mux_mode Date: Aug 2022 KernelVersion: 6.1
drivers/platform/x86/asus-wmi.c +65 -0
107 lines not on this page · raw message
include/linux/platform_data/x86/asus-wmi.h +7 -0
@@ -147,6 +147,13 @@#define ASUS_WMI_DEVID_GPU_MUX 0x00090016#define ASUS_WMI_DEVID_GPU_MUX_VIVO 0x00090026 +/* Keystone dongle insert/remove state. +* PRESENCE_BIT (0x00010000) encodes insert state: +* 0x00010000 = inserted, 0x00000000 = absent. STATUS_BIT is never set. +* 0xFFFFFFFE means no keystone slot on this machine. +*/ +#define ASUS_WMI_DEVID_KEYSTONE 0x00120091 +/* TUF laptop RGB modes/colours */ #define ASUS_WMI_DEVID_TUF_RGB_MODE 0x00100056#define ASUS_WMI_DEVID_TUF_RGB_MODE2 0x0010005A
Signature · 1 line
2.54.0
Ilpo Järvinen
maintainerQuoted 10 lines · Dariusz Figzał
The ASUS Keystone is a physical NFC-like dongle that slots into supported ASUS laptops. The EC fires WMI notify code
0xB4on insert/remove events.Expose the current insert state via a sysfs attribute by querying WMI device ID
0x00120091(DSTS). This devid does not follow the standard DSTS
convention:PRESENCE_BIT(0x00010000) encodes the insert state rather than feature presence, andSTATUS_BITis never set. Presence of a keystone slot is detected by a successful DSTS call.[...]
Thank you for your contribution, it has been applied to my local review-ilpo-next branch. Note it will show up in the public platform-drivers-x86/review-ilpo-next branch only once I've pushed my local branch there, which might take a while.
The list of commits applied:
[1/1] platform/x86: asus-wmi: add keystone dongle support
commit: 711104ab5ed500f155e4a53c56571b9b24a9a9b9
--
i.