[PATCH] usb: kbd: Add probe quirk for some generic USB mini keyboard

Dang Huynh danct12 at riseup.net
Fri Jun 7 11:19:48 CEST 2024


This adds a probe quirk to some generic USB mini keyboard, those uses
Elan's USB vendor ID and 0x1213 as product ID.

Those keyboards does not report current device state and would fail to
initialize under U-Boot with the following error:

"Failed to get keyboard state from device 04f3:1213"

It's not known if those generic USB mini keyboard has the same VID/PID.

Signed-off-by: Dang Huynh <danct12 at riseup.net>
---
 common/usb_kbd.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/common/usb_kbd.c b/common/usb_kbd.c
index 820f591fc5..d6451ba7c2 100644
--- a/common/usb_kbd.c
+++ b/common/usb_kbd.c
@@ -31,6 +31,8 @@
 #define USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_FINGERPRINT_2021	0x029a
 #define USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_2021		0x029f
 
+#define USB_VENDOR_ID_ELAN	0x04f3
+
 #define USB_VENDOR_ID_KEYCHRON	0x3434
 
 #define USB_HID_QUIRK_POLL_NO_REPORT_IDLE	BIT(0)
@@ -513,6 +515,7 @@ static int usb_kbd_probe_dev(struct usb_device *dev, unsigned int ifnum)
 
 	switch (dev->descriptor.idVendor) {
 	case USB_VENDOR_ID_APPLE:
+	case USB_VENDOR_ID_ELAN:
 	case USB_VENDOR_ID_KEYCHRON:
 		quirks |= USB_HID_QUIRK_POLL_NO_REPORT_IDLE;
 		break;

---
base-commit: 1ebd659cf020843fd8e8ef90d85a66941cbab6ec
change-id: 20240607-generic-minikbd-probe-c3ebc96bf8d3

Best regards,
-- 
Dang Huynh <danct12 at riseup.net>



More information about the U-Boot mailing list