[PATCH AUTOSEL 6.19-6.6] HID: asus: add xg mobile 2023 external hardware support

From: Sasha Levin

Date: Tue Mar 10 2026 - 05:06:24 EST


From: Denis Benato <denis.benato@xxxxxxxxx>

[ Upstream commit 377f8e788945d45b012ed9cfc35ca56c02e86cd8 ]

XG mobile stations have the 0x5a endpoint and has to be initialized:
add them to hid-asus.

Signed-off-by: Denis Benato <denis.benato@xxxxxxxxx>
Signed-off-by: Jiri Kosina <jkosina@xxxxxxxx>
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---

LLM Generated explanations, may be completely bogus:

## Analysis

### What the commit does
This commit adds a new USB device ID (`USB_DEVICE_ID_ASUSTEK_XGM_2023 =
0x1a9a`) for the ASUS XG Mobile 2023 docking station to the hid-asus
driver. The change consists of:
1. Defining the device ID constant in `hid-ids.h` (1 line)
2. Adding the device to the `asus_devices[]` table in `hid-asus.c` (3
lines, no quirk flags)

### Classification: New Device ID Addition
This is a textbook **new device ID addition to an existing driver**. The
hid-asus driver already exists in all stable kernel trees. Only the USB
device ID entry is new.

The commit message states: "XG mobile stations have the 0x5a endpoint
and has to be initialized: add them to hid-asus." This means the
device's HID interface (with report ID 0x5a = `FEATURE_KBD_REPORT_ID`)
needs the hid-asus driver to bind to it, rather than the generic HID
driver, for the device to function properly.

### Device entry details
The entry has **no quirk flags** set. This means minimal special
handling — the device simply needs to be claimed by hid-asus (rather
than generic HID) for proper initialization and event handling. The hid-
asus driver provides baseline handling that differs from the generic HID
driver, including filtering of `FEATURE_KBD_LED_REPORT_ID` events in the
raw_event handler.

### Risk assessment
- **Scope**: 4 lines changed across 2 files
- **Risk**: Extremely low — this only affects devices with USB VID/PID
`0x0b05:0x1a9a`. No existing device behavior is modified.
- **Self-contained**: Yes — no dependencies on other commits. The change
only requires the existing hid-asus driver infrastructure.

### Stable kernel criteria
- **Obviously correct**: Yes — adding a device ID to an existing table
with established patterns
- **Fixes real issue**: Enables hardware support for users with XG
Mobile 2023 docking stations
- **Small and contained**: 4 lines total
- **No new features/APIs**: Just a device ID, no new quirk mechanisms or
user-visible interfaces
- **Exception category**: New Device IDs — explicitly listed as
appropriate for stable

### Verification
- Read `asus_probe()` at hid-asus.c:1127-1248 to confirm behavior with
zero quirk flags — device goes through standard HID parse/start path
and gets named "Asus Keyboard"
- Confirmed `USB_DEVICE_ID_ASUSTEK_XGM_2023` is only defined and used in
these two files (self-contained)
- Confirmed the device table entry follows the exact same pattern as
other entries in `asus_devices[]` (e.g., `USB_DEVICE_ID_ASUS_AK1D` and
`USB_DEVICE_ID_ASUS_MD_5110` also have no quirk flags)
- Confirmed `FEATURE_KBD_REPORT_ID` is defined as `0x5a` at line 51,
matching the commit message about the 0x5a endpoint
- No quirk flag dependencies — the entry is independent of any other
code changes

**YES**

drivers/hid/hid-asus.c | 3 +++
drivers/hid/hid-ids.h | 1 +
2 files changed, 4 insertions(+)

diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
index 8487332bf43b0..b1ad4e9f20c85 100644
--- a/drivers/hid/hid-asus.c
+++ b/drivers/hid/hid-asus.c
@@ -1404,6 +1404,9 @@ static const struct hid_device_id asus_devices[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
USB_DEVICE_ID_ASUSTEK_ROG_NKEY_ALLY_X),
QUIRK_USE_KBD_BACKLIGHT | QUIRK_ROG_NKEY_KEYBOARD | QUIRK_ROG_ALLY_XPAD },
+ { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
+ USB_DEVICE_ID_ASUSTEK_XGM_2023),
+ },
{ HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
USB_DEVICE_ID_ASUSTEK_ROG_CLAYMORE_II_KEYBOARD),
QUIRK_ROG_CLAYMORE_II_KEYBOARD },
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 85ab1ac511096..7fd67745ee010 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -229,6 +229,7 @@
#define USB_DEVICE_ID_ASUSTEK_ROG_NKEY_ALLY_X 0x1b4c
#define USB_DEVICE_ID_ASUSTEK_ROG_CLAYMORE_II_KEYBOARD 0x196b
#define USB_DEVICE_ID_ASUSTEK_FX503VD_KEYBOARD 0x1869
+#define USB_DEVICE_ID_ASUSTEK_XGM_2023 0x1a9a

#define USB_VENDOR_ID_ATEN 0x0557
#define USB_DEVICE_ID_ATEN_UC100KM 0x2004
--
2.51.0