Message ID | 20240607-generic-minikbd-probe-v1-1-6a0e2646adfb@riseup.net |
---|---|
State | New |
Delegated to: | Marek Vasut |
Headers | show |
Series | usb: kbd: Add probe quirk for some generic USB mini keyboard | expand |
On 6/7/24 11:19 AM, Dang Huynh wrote: > 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@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; Is it all keyboards from this vendor that are affected, or should this quirk be applied only to a specific VID/PID of this device ?
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;
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@riseup.net> --- common/usb_kbd.c | 3 +++ 1 file changed, 3 insertions(+) --- base-commit: 1ebd659cf020843fd8e8ef90d85a66941cbab6ec change-id: 20240607-generic-minikbd-probe-c3ebc96bf8d3 Best regards,