linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/7] HID: asus: ASUS Zenbook Duo keyboard support
@ 2026-10-13 10:39 Paolo Pisati
  2026-10-13 10:39 ` [PATCH v3 1/7] HID: asus: Fix up Zenbook Duo report descriptors Paolo Pisati
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: Paolo Pisati @ 2026-10-13 10:39 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires
  Cc: linux-input, linux-kernel, Luke Jones, Joshua Leivenzon,
	Ivan Levchenko, Rebecca Mara Müller, Nathan Chancellor,
	Denis Benato

Add support for the detachable USB/Bluetooth keyboard of the ASUS
Zenbook Duo line (UX8406MA, UX8406CA, UX8407AA): hotkeys, keyboard
backlight and the platform profile key, over both transports.

This patchset is a collective effort, gathered here:

  https://github.com/NeroReflex/asusctl/issues/25

Tested on a UX8407AA against 7.3, docked and over Bluetooth: hotkeys,
keyboard backlight, Fn+F profile cycling, and the touchpad staying with
hid-multitouch. Rebecca tested v2 the same way on her UX8407AA.

Rebecca Mara Müller posted an independent patch for the UX8407AA
keyboard in August [1]. This series follows it in using
HID_CONNECT_HIDINPUT_FORCE and in binding the IDs by group, and
carries her re-sent handshake as the last patch.

Changes in v3:
- Queue at most one platform profile cycle at a time, so that a device
  repeating the key cannot grow the worker's action list (Sashiko).
- Bind the Bluetooth IDs to HID_GROUP_GENERIC as well: over Bluetooth
  the touchpad is a second HID device with the same IDs, which hid-asus
  must leave to hid-multitouch (Sashiko).
- Say "15 data bytes, 16 with the report ID" where the feature report
  size is discussed: hid_report_len() counts the ID, so the 16 byte
  handshake is sent whole (Sashiko).
- Add Rebecca's Tested-by, and Assisted-by on her patch at her request.

Changes in v2:
- Rebase onto hid.git#for-7.4/asus; QUIRK_ZENBOOK_DUO_KEYBOARD moves to
  BIT(16) as BIT(15) is taken now.
- Fold the USB descriptor offsets and the padding removal into the
  descriptor fixup patch; fix the padding removal, which read past the
  end of the descriptor and could write past the end of the new one,
  and move the whole remainder of the descriptor instead of 12 bytes,
  as the Zenbook Duo collection does not end there (Sashiko).
- End the fixup's branch chain with a plain else so clang does not warn
  that rsize_orig may be uninitialized (kernel test robot, Nathan).
- Drop the MyASUS key mapping, which is upstream as KEY_PROG1 now and
  matches asus-nb-wmi (Sashiko).
- Use HID_CONNECT_HIDINPUT_FORCE on the vendor interface instead of
  injecting a fake keyboard collection into its descriptor (Sashiko
  flagged the malformed padding item).
- Cycle the platform profile from the driver's worker instead of the
  HID event callback, consume the event, and only build the call when
  ACPI_PLATFORM_PROFILE is reachable; v1 did not link on architectures
  without ACPI (Sashiko).
- New: cap feature report writes at the declared report length; the
  Zenbook Duo does not answer the 64 byte writes the driver sends for
  the backlight since 7.3.
- Bind the USB IDs to HID_GROUP_GENERIC so hid-multitouch keeps the
  touchpad interfaces, and leave Fn-lock out, see that patch.
- New: re-send the handshake after probe (from Rebecca's patch).
- Use the "HID: asus:" subject prefix, write commit messages for every
  patch, and fix the Signed-off-by chains.

Not covered: Fn-lock (see patch 6). On the UX8407AA the screen swap key
sends a Super+P chord by itself; the 0x9c mapping is for the UX8406MA.
Sashiko also pointed out, on v2 4/7, that the worker's WMI fan fallback
takes driver_input_lock while hid_device_remove() holds it around
asus_remove(), which waits for the worker; that predates this series
and is better fixed separately.

v2: https://lore.kernel.org/r/20261009153459.124752-1-p.pisati@gmail.com
v1: https://lore.kernel.org/r/20260513163248.16483-1-p.pisati@gmail.com
[1] https://lore.kernel.org/r/20260811125548.1975748-1-rebecca.mara@posteo.de

Joshua Leivenzon (4):
  HID: asus: Fix up Zenbook Duo report descriptors
  HID: asus: Add missing Zenbook Duo hotkeys
  HID: asus: Force hid-input to bind to the Zenbook Duo hotkey interface
  HID: asus: Cycle the platform profile from the Zenbook Duo profile key

Luke Jones (1):
  HID: asus: add prod-id, quirk for Zenbook Duo keyboard

Paolo Pisati (1):
  HID: asus: Do not send feature reports larger than declared

Rebecca Mara Müller (1):
  HID: asus: Re-send the Zenbook Duo keyboard handshake after probe

 drivers/hid/hid-asus.c | 194 +++++++++++++++++++++++++++++++++++++----
 drivers/hid/hid-ids.h  |   6 ++
 2 files changed, 185 insertions(+), 15 deletions(-)


base-commit: 8099f9da59f1c338bf88e25b7aa2a7fdf840879c
-- 
2.43.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-10-13 13:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-13 10:39 [PATCH v3 0/7] HID: asus: ASUS Zenbook Duo keyboard support Paolo Pisati
2026-10-13 10:39 ` [PATCH v3 1/7] HID: asus: Fix up Zenbook Duo report descriptors Paolo Pisati
2026-10-13 10:39 ` [PATCH v3 2/7] HID: asus: Add missing Zenbook Duo hotkeys Paolo Pisati
2026-10-13 10:40 ` [PATCH v3 3/7] HID: asus: Force hid-input to bind to the Zenbook Duo hotkey interface Paolo Pisati
2026-10-13 10:40 ` [PATCH v3 4/7] HID: asus: Cycle the platform profile from the Zenbook Duo profile key Paolo Pisati
2026-10-13 10:40 ` [PATCH v3 5/7] HID: asus: Do not send feature reports larger than declared Paolo Pisati
2026-10-13 10:40 ` [PATCH v3 6/7] HID: asus: add prod-id, quirk for Zenbook Duo keyboard Paolo Pisati
2026-10-13 10:40 ` [PATCH v3 7/7] HID: asus: Re-send the Zenbook Duo keyboard handshake after probe Paolo Pisati
2026-10-13 11:45 ` [PATCH v3 0/7] HID: asus: ASUS Zenbook Duo keyboard support Rebecca Mara Müller
2026-10-13 13:56   ` Denis Benato

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).