25 Nov, 2019

5 commits


11 Sep, 2019

3 commits


12 Aug, 2019

1 commit


14 Apr, 2019

1 commit

  • So far arrows key pressed on an USB keyboard got translated to some
    low ASCII control sequences (Ctrl+N, Ctrl+P). Some programs understand
    these codes, but the standard for those keys is to use ANSI control
    sequences for cursor movement (ESC [ A).
    Our own boot menu is a victim of this, currently we cannot change the
    selection with an USB keyboard due to this.

    Since we already implement a queue for USB key codes, we can just insert
    the three character ANSI sequence into the key buffer. This fixes the
    bootmenu, and is more universal for other users (UEFI) as well.

    Signed-off-by: Andre Przywara
    Reviewed-by: Simon Glass

    Andre Przywara
     

27 Nov, 2018

1 commit


19 Jul, 2018

2 commits


07 May, 2018

1 commit

  • When U-Boot started using SPDX tags we were among the early adopters and
    there weren't a lot of other examples to borrow from. So we picked the
    area of the file that usually had a full license text and replaced it
    with an appropriate SPDX-License-Identifier: entry. Since then, the
    Linux Kernel has adopted SPDX tags and they place it as the very first
    line in a file (except where shebangs are used, then it's second line)
    and with slightly different comment styles than us.

    In part due to community overlap, in part due to better tag visibility
    and in part for other minor reasons, switch over to that style.

    This commit changes all instances where we have a single declared
    license in the tag as both the before and after are identical in tag
    contents. There's also a few places where I found we did not have a tag
    and have introduced one.

    Signed-off-by: Tom Rini

    Tom Rini
     

16 Aug, 2017

1 commit

  • We are now using an env_ prefix for environment functions. Rename these
    two functions for consistency. Also add function comments in common.h.

    Quite a few places use getenv() in a condition context, provoking a
    warning from checkpatch. These are fixed up in this patch also.

    Suggested-by: Wolfgang Denk
    Signed-off-by: Simon Glass

    Simon Glass
     

06 Feb, 2017

1 commit


24 Oct, 2016

1 commit


24 Sep, 2016

1 commit


10 Apr, 2016

1 commit

  • The dm usb_kbd_remove function() will deregister the usb keyboard for
    us on a "usb reset" / "usb stop" so there is no need to manually call
    usb_kbd_deregister() in the dm case.

    This commit removes usb_kbd_deregister() in the dm case fixing the
    following "usb reset" errors:

    usb_kbd_remove: warning, ret=-6
    device_remove: Device 'usb_kbd' failed to remove, but children are gone

    Signed-off-by: Hans de Goede

    Hans de Goede
     

26 Jan, 2016

1 commit

  • Scan code 0x39 is CapsLock, which is not a printable character and thus
    is not covered by either usb_kbd_numkey_shifted[] or usb_kbd_numkey[].
    Fix the scan code check to avoid looking it up in either of the arrays.

    Signed-off-by: Marek Vasut

    Marek Vasut
     

08 Jan, 2016

1 commit


18 Dec, 2015

1 commit

  • When CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP is enabled, use a
    GET_REPORT control transfer to retrieve the initial state of the
    keyboard. This matches the technique used to poll the keyboard state.
    This is useful since it eliminates the remaining use of interrupt
    transfers from the USB keyboard driver, which allows it to work with
    USB HCD that don't support interrupt transfers.

    Cc: Hans de Goede
    Signed-off-by: Stephen Warren

    Stephen Warren
     

20 Nov, 2015

5 commits


05 Nov, 2015

1 commit


12 Sep, 2015

1 commit


22 Jul, 2015

1 commit

  • In Linux USB_DEVICE() is used to declare a USB device by vendor/device ID.
    We should follow the same convention in U-Boot. Rename the existing
    USB_DEVICE() macro to U_BOOT_USB_DEVICE() and bring in the USB_DEVICE()
    macro from Linux for use in U-Boot.

    Signed-off-by: Simon Glass

    Simon Glass
     

19 Jun, 2015

1 commit


29 May, 2015

1 commit

  • 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

    Hans de Goede
     

19 Apr, 2015

2 commits


18 Jan, 2015

2 commits

  • When iomuxing is used we must not only deregister the device with stdio.c,
    but also remove the reference to the device in the console_devices array
    used by console-muxing. Add a call to iomux_doenv to usb_kbd_deregister to
    update console_devices, which will drop the reference.

    This fixes the console filling with "Failed to enqueue URB to controller"
    messages after a "usb stop force", or when the USB keyboard is gone after a
    "usb reset".

    Signed-off-by: Hans de Goede

    Hans de Goede
     
  • Currently create_int_queue is only implemented by the ehci code, and that
    does not honor interrupt intervals, but other drivers which might also want
    to implement create_int_queue may honor intervals, so add an interval param.

    Signed-off-by: Hans de Goede

    Hans de Goede
     

04 Nov, 2014

4 commits