Browse Source

usb: kbd: Disable idle input reports when we do not need them

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>
Hans de Goede 10 years ago
parent
commit
de451493f1
1 changed files with 3 additions and 1 deletions
  1. 3 1
      common/usb_kbd.c

+ 3 - 1
common/usb_kbd.c

@@ -460,10 +460,12 @@ static int usb_kbd_probe(struct usb_device *dev, unsigned int ifnum)
 	/* We found a USB Keyboard, install it. */
 	/* We found a USB Keyboard, install it. */
 	usb_set_protocol(dev, iface->desc.bInterfaceNumber, 0);
 	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) && \
 #if !defined(CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP) && \
     !defined(CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE)
     !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);
 	usb_set_idle(dev, iface->desc.bInterfaceNumber, REPEAT_RATE / 4, 0);
+#else
+	usb_set_idle(dev, iface->desc.bInterfaceNumber, 0, 0);
 #endif
 #endif
 
 
 	debug("USB KBD: enable interrupt pipe...\n");
 	debug("USB KBD: enable interrupt pipe...\n");