From nobody Fri Jul 24 21:30:16 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 505C941227B; Fri, 24 Jul 2026 12:38:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784896703; cv=none; b=UUy6SEAX5Aq01aQYxNPJ+aHq+zV3mLBjEvLSe5yJUkKCRumxOhTA5oHNBcRh7du/7JIRNh5Dx+tGW/uu5XEvw0XdQIqHWAJAvuHFPvGePkxzzqrzePAJszKMSzPS5qOiJvRw/drjeufdHgxy5OGdDEMU+THkwypxasBii1LZ+Bk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784896703; c=relaxed/simple; bh=uS5Vrr7BWTN/VFRHlxltnRp8R2fPfjv2gxZrvqQYk+Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=VmQoeXHQarIfQ8S/mV6fQduYyIuIzMq3MlartFpjxRGgJFBXD/Myz8MKUQq+y7Ce1l4hnqtamgMiA94OgdSwjF3AOp4QWJEnimaUyLPbxiyZzJhwz5Ko4u3XVzhGYWijK3xlHXOCoGNqwxxPdquZ5ZhqCGDxj5bnINNms4jJKZg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=k8IVi3KC; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="k8IVi3KC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0DE2F1F000E9; Fri, 24 Jul 2026 12:38:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1784896702; bh=Ossg9tqp/RyK3DyfBpL7K2pW5CWx1arDejdYCY9gJuI=; h=From:Date:Subject:To:Cc; b=k8IVi3KCtKe2tnvUZ2Q63yCA6Qh0KVZ+A9pnslrtIwTy6mtJSr4VbG9fJlDn55UqP ag34TInbBPzedIFSDAdAgun41m4u/CiVlSzRB4TEqgLfjxLXEkVVLFsNd8DNWWVIii aGQQgPTgLaEnwn2q/lVon7DnYLJPJfzBQFIKSKq6FxX1kydmflhLq3saWtR75cNAN/ yqNACRYPDF99EXL46+pDJWgQWPSv/5flrTvEhKgIIdEqbMuNmWo+s8rOkQJGZ33zSD r4vGEC7izuNZzddagDVtFsmPv4G+M5es02iSUGbdAEIOB6+wlVTMuvlMrT936Rw20I L99gJN0EgTFlw== From: Konrad Dybcio Date: Fri, 24 Jul 2026 14:38:13 +0200 Subject: [PATCH] HID: asus: support the Zenbook A16 (UX3607OA) keyboard Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260724-topic-asus_keyboard-v1-1-a746ff8f77b2@oss.qualcomm.com> X-B4-Tracking: v=1; b=H4sIAAAAAAAC/yXMTQqDQAxA4atI1h3QKNp6lSIyP9GmgiMTLRXx7 o66/BbvbSAUmATqZINAPxb2Y0T2SMB+9NiTYhcNmGKZVlio2U9slZZF2oFW43Vw6plniAZfzqK GWE6BOv5f13dzWxbzJTufK9j3A03al5d3AAAA X-Change-ID: 20260724-topic-asus_keyboard-83122b29dc2a To: Jiri Kosina , Benjamin Tissoires Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Bjorn Andersson , Konrad Dybcio X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1784896699; l=4732; i=konrad.dybcio@oss.qualcomm.com; s=20230215; h=from:subject:message-id; bh=8psPs+qZE7+KTuMaC3LgQMiVjnGMH++yEKQFKCo3ssw=; b=Q7x12ORMn1Pt5DXxuRMwMsxslHM5jOWFGPUqrFjqlAqZnJcRUcpVDKNqMZ1l6ow8RVXVi5AKj 6K7j8JwTRryCW04EuAD2WaA/ihNIwKC+ygB6EHYQM2fyMOkFzf9fgJM X-Developer-Key: i=konrad.dybcio@oss.qualcomm.com; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= From: Konrad Dybcio The ASUS Zenbook A16 (UX3607OA), a Qualcomm Snapdragon X2 Elite Extreme (Glymur)-based laptop, carries its main keyboard on an I2C-HID device with the ID 0B05:4B42. Its Fn/media hotkeys are emitted as vendor-page (HID_UP_ASUSVENDOR) usages on report 0x5A. Match the device in hid-asus with the standard I2C keyboard quirks and add the three usage mappings observed on the hardware: 0x85 -> KEY_CAMERA (Fn+F11, camera toggle) 0x86 -> KEY_PROG1 (Fn+F12, MyASUS key) 0x5f -> KEY_PROG2 (extra programmable key) The camera-toggle key reports its usage (0x85) together with a companion state byte in the same array report ("5a 85 01" / "5a 85 10"). The 0x10 companion aliases the brightness-down vendor usage and spuriously dims the panel, so add QUIRK_FILTER_CAMERA_COMPANION to zero the companion slots for this device before input mapping. The quirk is device-gated so no other ASUS model is affected. Assisted-by: Claude Code:claude-opus-4-8 Signed-off-by: Konrad Dybcio --- drivers/hid/hid-asus.c | 18 ++++++++++++++++++ drivers/hid/hid-ids.h | 1 + 2 files changed, 19 insertions(+) diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c index d34d74df3dc0..789546238dc7 100644 --- a/drivers/hid/hid-asus.c +++ b/drivers/hid/hid-asus.c @@ -99,6 +99,7 @@ MODULE_DESCRIPTION("Asus HID Keyboard and TouchPad"); #define QUIRK_ROG_CLAYMORE_II_KEYBOARD BIT(12) #define QUIRK_ROG_ALLY_XPAD BIT(13) #define QUIRK_HID_FN_LOCK BIT(14) +#define QUIRK_FILTER_CAMERA_COMPANION BIT(15) =20 #define I2C_KEYBOARD_QUIRKS (QUIRK_FIX_NOTEBOOK_REPORT | \ QUIRK_NO_INIT_REPORTS | \ @@ -460,6 +461,17 @@ static int asus_raw_event(struct hid_device *hdev, return -1; } =20 + /* + * The camera-toggle key reports its vendor usage (0x85) together with a + * companion state byte in the same array report, e.g. "5a 85 01" and + * "5a 85 10" for the two toggle positions. The 0x10 companion aliases the + * brightness-down vendor usage and would spuriously dim the panel, so dr= op + * the companion slots and leave only the camera usage for input mapping. + */ + if (drvdata->quirks & QUIRK_FILTER_CAMERA_COMPANION && + report->id =3D=3D FEATURE_KBD_REPORT_ID && size >=3D 3 && data[1] =3D= =3D 0x85) + memset(&data[2], 0, size - 2); + return 0; } =20 @@ -1051,6 +1063,8 @@ static int asus_input_mapping(struct hid_device *hdev, case 0x6c: asus_map_key_clear(KEY_SLEEP); break; case 0x7c: asus_map_key_clear(KEY_MICMUTE); break; case 0x82: asus_map_key_clear(KEY_CAMERA); break; + case 0x85: asus_map_key_clear(KEY_CAMERA); break; + case 0x86: asus_map_key_clear(KEY_PROG1); break; /* MyASUS key */ case 0x88: asus_map_key_clear(KEY_RFKILL); break; case 0xb5: asus_map_key_clear(KEY_CALC); break; case 0xc4: asus_map_key_clear(KEY_KBDILLUMUP); break; @@ -1060,6 +1074,7 @@ static int asus_input_mapping(struct hid_device *hdev, case 0x7e: asus_map_key_clear(KEY_EMOJI_PICKER); break; =20 case 0x8b: asus_map_key_clear(KEY_PROG1); break; /* ProArt Creator Hub k= ey */ + case 0x5f: asus_map_key_clear(KEY_PROG2); break; /* S-shaped programmabl= e key */ case 0x6b: asus_map_key_clear(KEY_F21); break; /* ASUS touchpad toggle = */ case 0x38: asus_map_key_clear(KEY_PROG1); break; /* ROG key */ case 0xba: asus_map_key_clear(KEY_PROG2); break; /* Fn+C ASUS Splendid */ @@ -1483,6 +1498,9 @@ static const __u8 *asus_report_fixup(struct hid_devic= e *hdev, __u8 *rdesc, static const struct hid_device_id asus_devices[] =3D { { HID_I2C_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_I2C_KEYBOARD), I2C_KEYBOARD_QUIRKS}, + { HID_I2C_DEVICE(USB_VENDOR_ID_ASUSTEK, + USB_DEVICE_ID_ASUSTEK_I2C_ZENBOOK_KEYBOARD), + I2C_KEYBOARD_QUIRKS | QUIRK_FILTER_CAMERA_COMPANION }, { HID_I2C_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_I2C_TOUCHPAD), I2C_TOUCHPAD_QUIRKS }, { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index b70f719b3b07..f381fcd9a76d 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -220,6 +220,7 @@ #define USB_DEVICE_ID_ASUSTEK_T101HA_KEYBOARD 0x183d #define USB_DEVICE_ID_ASUSTEK_T304_KEYBOARD 0x184a #define USB_DEVICE_ID_ASUSTEK_I2C_KEYBOARD 0x8585 +#define USB_DEVICE_ID_ASUSTEK_I2C_ZENBOOK_KEYBOARD 0x4b42 #define USB_DEVICE_ID_ASUSTEK_I2C_TOUCHPAD 0x0101 #define USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD1 0x1854 #define USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD2 0x1837 --- base-commit: 9eebf259d5352b87080d67758f483583d9e763d7 change-id: 20260724-topic-asus_keyboard-83122b29dc2a Best regards, -- =20 Konrad Dybcio