]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
usb: kbd: Disable idle input reports when we do not need them
authorHans de Goede <hdegoede@redhat.com>
Thu, 18 Jun 2015 20:34:34 +0000 (22:34 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 22:42:52 +0000 (00:42 +0200)
When we're polling and thus handling key-repeat in software, make sure
to disable idle reports, some keyboards may have these enabled by default
messing up our software keyrepeat.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
common/usb_kbd.c

index 49bfc096e40904f03cdf978f37f040d81150fa65..e2af67d2f0a783c13709f57bd15d1b9d87f5f7ce 100644 (file)
@@ -460,10 +460,12 @@ static int usb_kbd_probe(struct usb_device *dev, unsigned int ifnum)
        /* We found a USB Keyboard, install it. */
        usb_set_protocol(dev, iface->desc.bInterfaceNumber, 0);
 
+       debug("USB KBD: found set idle...\n");
 #if !defined(CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP) && \
     !defined(CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE)
-       debug("USB KBD: found set idle...\n");
        usb_set_idle(dev, iface->desc.bInterfaceNumber, REPEAT_RATE / 4, 0);
+#else
+       usb_set_idle(dev, iface->desc.bInterfaceNumber, 0, 0);
 #endif
 
        debug("USB KBD: enable interrupt pipe...\n");