Commit de451493f1b6dfcc572763be421500754bfc6b2f

Authored by Hans de Goede
Committed by Marek Vasut
1 parent 7f59d16a50

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>

Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff

... ... @@ -460,10 +460,12 @@
460 460 /* We found a USB Keyboard, install it. */
461 461 usb_set_protocol(dev, iface->desc.bInterfaceNumber, 0);
462 462  
  463 + debug("USB KBD: found set idle...\n");
463 464 #if !defined(CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP) && \
464 465 !defined(CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE)
465   - debug("USB KBD: found set idle...\n");
466 466 usb_set_idle(dev, iface->desc.bInterfaceNumber, REPEAT_RATE / 4, 0);
  467 +#else
  468 + usb_set_idle(dev, iface->desc.bInterfaceNumber, 0, 0);
467 469 #endif
468 470  
469 471 debug("USB KBD: enable interrupt pipe...\n");