diff options
author | Hans de Goede <hdegoede@redhat.com> | 2015-05-19 22:51:03 +0200 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2015-05-29 12:41:05 +0200 |
commit | 8454c84af5401f8c3bcd0ed2625043270d0ef6aa (patch) | |
tree | 6b3d86af8828f457ee81106a7b0abaafbbebb590 /arch/arm/mach-uniphier/board_late_init.c | |
parent | 5cfd6c002aa962d102953936a77cc170bb6e5265 (diff) | |
download | u-boot-imx-8454c84af5401f8c3bcd0ed2625043270d0ef6aa.zip u-boot-imx-8454c84af5401f8c3bcd0ed2625043270d0ef6aa.tar.gz u-boot-imx-8454c84af5401f8c3bcd0ed2625043270d0ef6aa.tar.bz2 |
usb: kbd: Fix key repeat not always working
The usb-kbd key repeat code assumes that reports get repeated every 40 ms,
this is never true when using CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP, and
does not always works for CONFIG_SYS_USB_EVENT_POLL and
CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE since not all usb keyboards honor
the usb_set_idle() command.
For CONFIG_SYS_USB_EVENT_POLL we must use usb_set_idle() since we do a
blocking wait for the hid report, so if we do not tell the keyboard to send
a hid report every 40ms even if nothing changes then we will block u-boot
for 1s (the default u-boot usb interrupt packet timeout). Note that in this
case on keyboards which do not support usb_set_idle() we loose and we actually
get 1s latencies on other u-boot activities.
For the other poll-methods this commit stops using usb_set_idle() and instead
repeats the last received hid-report every 40 ms as long as no new hid-report
is received. This fixes key-repeat not working at all with
CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP and fixes it not working with
keyboards which do not implement usb_set_idle() when using
CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'arch/arm/mach-uniphier/board_late_init.c')
0 files changed, 0 insertions, 0 deletions