input: Add mouse support

When running a simple GUI it is useful to support a mouse. This is
similar to what is provided in UEFI's boot menu. Add a simple uclass and
a way to read the mouse position.

For sandbox add a driver that reads the position from SDL. Disable input
for the tools-only build, since it is of no use there and causes build
failures.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2020-02-08 09:08:38 -07:00
parent ad59fee0e8
commit 74cf6bee6c
7 changed files with 129 additions and 1 deletions

View File

@@ -100,3 +100,12 @@ config TWL4030_INPUT
bool "Enable TWL4030 Input controller"
help
Enable TWL4030 Input controller
config MOUSE
bool "Support for mice and other pointing devices"
default y if SANDBOX
help
This allows U-Boot to access mouse input, typically needed for
graphics boot menus and the like. The driver can provide mouse
events based on user interaction and these can be used to control
U-Boot's operation.