[U-Boot] [PATCH v4 0/7] usb: kbd: implement special keys

Heinrich Schuchardt xypron.glpk at gmx.de
Sat Nov 23 17:15:17 UTC 2019


GRUB uses function keys. So we should support these with an USB keyboard.
Provide support for F1-F12, Insert, Delete, Home, End, Page Up, Page Down.
Simplify the code beforehand.

Enhance the keyboard unit test.

In total I could not see any increase of u-boot.img on the TBS2910 but
as the special keys are only needed in the context of the UEFI subsystem
it makes sense to save several hundred bytes on other boards.

size of u-boot.bin for tbs2910_defconfig
390080
with patch usb: kbd: implement special keys
389968
with all my patches
389968
tbs_defconfig, function keys enabled
390080

v4:
	reduce code size by avoiding string constants and introducing
	a configuration switch CONFIG_USB_KEYBOARD_FN_KEYS
v3:
	rebase on current git HEAD
v2:
	enhance the keyboard unit test

Heinrich Schuchardt (7):
  usb: kbd: fix typo
  usb: kbd: signature of usb_kbd_put_queue()
  usb: kbd: simplify coding for arrow keys
  usb: kbd: implement special keys
  usb: kbd: move USB_KBD_BOOT_REPORT_SIZE to usb.h
  dm: test: usb: rework keyboard test
  sandbox: enable USB_KEYBOARD_FN_KEYS

 common/usb_kbd.c                   |  97 +++++-----
 configs/sandbox64_defconfig        |   1 +
 configs/sandbox_defconfig          |   1 +
 configs/sandbox_flattree_defconfig |   1 +
 configs/sandbox_spl_defconfig      |   1 +
 drivers/usb/Kconfig                |   6 +
 drivers/usb/emul/sandbox_keyb.c    |  27 ++-
 include/usb.h                      |   6 +
 test/dm/usb.c                      | 284 ++++++++++++++++++++++++++++-
 9 files changed, 364 insertions(+), 60 deletions(-)

--
2.24.0



More information about the U-Boot mailing list