mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] HID: asus: map Consumer brightness usages on I2C keyboards
@ 2026-10-20 22:09 David Cemin
  0 siblings, 0 replies; only message in thread
From: David Cemin @ 2026-10-20 22:09 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires
  Cc: Konrad Dybcio, linux-input, linux-kernel, linux-tegra

Several ASUS laptops carry their keyboard on an I2C-HID device with ID
0B05:4B42, the same ID as the Zenbook A16 (UX3607OA), so they bind to
hid-asus with I2C_KEYBOARD_QUIRKS since
commit 206107536018 ("HID: asus: support the Zenbook A16 (UX3607OA) keyboard").

Unlike the A16, which reports its brightness hotkeys on the ASUS vendor
page, these keyboards report them as the standard Consumer usages
Display Brightness Decrement (0x70) and Display Brightness Increment
(0x6f) on report 3. I2C_KEYBOARD_QUIRKS includes QUIRK_NO_CONSUMER_USAGES,
whose input mapping ignores every Consumer usage except mute and volume,
so the brightness keys never produce input events. The keys work when
the keyboard happens to be bound to hid-generic, which maps those usages
by default, and stop working as soon as hid-asus claims the device.

Let the two display brightness usages through the filter so hid-input
maps them to KEY_BRIGHTNESSUP and KEY_BRIGHTNESSDOWN. Keyboards that do
not report them are unaffected.

Tested on two ASUS laptop models with this keyboard: with the keyboard
bound to hid-asus, the brightness keys now adjust the panel brightness.

Signed-off-by: David Cemin <dcemin@nvidia.com>
---
 drivers/hid/hid-asus.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
index c38a2b3b33d9..cf21eee68419 100644
--- a/drivers/hid/hid-asus.c
+++ b/drivers/hid/hid-asus.c
@@ -1311,6 +1311,8 @@ static int asus_input_mapping(struct hid_device *hdev,
 		case 0xe2: /* Mute */
 		case 0xe9: /* Volume up */
 		case 0xea: /* Volume down */
+		case 0x6f: /* Display brightness increment */
+		case 0x70: /* Display brightness decrement */
 			return 0;
 		default:
 			/* Ignore dummy Consumer usages which make the

base-commit: f47d223627f80cb7a1eb14c585fe6cb35de5e984
-- 
2.55.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-20 22:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-20 22:09 [PATCH] HID: asus: map Consumer brightness usages on I2C keyboards David Cemin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®