[PATCH] platform/x86: asus-wmi: add tablet-mode switch quirk for ASUS ProArt PX13

Tinoy Thomas <[email protected]> Wed, 5 Aug 2026 05:56:18 -0500
Newsgroups org.kernel.vger.platform-driver-x86
Message-ID <[email protected]>
The ProArt PX13 (HN7306WV) is a 360-degree convertible. It exposes no
dedicated SW_TABLET_MODE input switch, but the firmware implements the
ASUS WMI lid-flip query (DSTS dev_id 0x00060062): it returns 0x10000
with the lid open and 0x10001 when the screen is folded back, and the
0xfa (NOTIFY_LID_FLIP) WMI event fires on every fold/unfold transition.

Add a DMI quirk selecting the lid-flip dev-id so the driver registers
SW_TABLET_MODE on the "Asus WMI hotkeys" input device and reports the
hinge state, matching the existing UX360 behavior.

Signed-off-by: Tinoy Thomas <[email protected]>
---
 drivers/platform/x86/asus-nb-wmi.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

--- a/drivers/platform/x86/asus-nb-wmi.c	2026-08-05 05:28:53.916829859 -0500
+++ b/drivers/platform/x86/asus-nb-wmi.c	2026-08-05 05:28:53.928922114 -0500
@@ -137,6 +137,10 @@
 	.tablet_switch_mode = asus_wmi_lid_flip_devid,
 };
 
+static struct quirk_entry quirk_asus_proart_px13 = {
+	.tablet_switch_mode = asus_wmi_lid_flip_devid,
+};
+
 static struct quirk_entry quirk_asus_tablet_mode = {
 	.wmi_backlight_set_devstate = true,
 	.tablet_switch_mode = asus_wmi_lid_flip_rog_devid,
@@ -562,6 +566,15 @@
 		},
 		.driver_data = &quirk_asus_z13,
 	},
+	{
+		.callback = dmi_matched,
+		.ident = "ASUS ProArt PX13",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "HN7306WV"),
+		},
+		.driver_data = &quirk_asus_proart_px13,
+	},
 	{},
 };