
On 3/17/24 12:07 PM, Janne Grunau via B4 Relay wrote:
From: Janne Grunau j@jannau.net
Those keyboards do not return the current device state. Polling will timeout unless there are key presses. This is not a problem during operation but the inital device state query during probing will fail. Skip this step in usb_kbd_probe_dev() to make these devices useable. Not all Apple keyboards behave like this. A keyboard with USB vendor/product ID 05ac:0221 is reported to work with the current code. Unfortunately some Keychron keyboards "re-use" Apple's vendor ID and show the same behavior (Keychron C2, 05ac:024f for example).
Reviewed-by: Marek Vasut marex@denx.de Signed-off-by: Janne Grunau j@jannau.net
common/usb_kbd.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
diff --git a/common/usb_kbd.c b/common/usb_kbd.c index 8cc3345075..43c7668671 100644 --- a/common/usb_kbd.c +++ b/common/usb_kbd.c @@ -31,6 +31,10 @@ #define USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_FINGERPRINT_2021 0x029a #define USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_2021 0x029f
+#define USB_VENDOR_ID_KEYCHRON 0x3434
+#define USB_HID_QUIRK_POLL_NO_REPORT_IDLE (1 << 0)
Use BIT(0) instead of (1 << 0)
With that fixed:
Reviewed-by: Marek Vasut marex@denx.de