[PATCH] usb: kbd: Add probe quirk for some generic USB mini keyboard
Marek Vasut
marex at denx.de
Fri Jun 7 14:53:27 CEST 2024
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 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;
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 ?
More information about the U-Boot
mailing list