[Concept,0/6] Provide basic support for a mouse

Message ID 20250825204022.3655799-1-sjg@u-boot.org
Headers
Series Provide basic support for a mouse |

Message

Simon Glass Aug. 25, 2025, 8:40 p.m. UTC
  From: Simon Glass <sjg@chromium.org>

This series introduces a mouse uclass and provides drivers for two types
of mouse: sandbox (using SDL) and USB (potentially usable on any
hardware).

Note that this was written four years ago, so may need some tweaking. I
have tidied it up so that it builds and that (after running sandbox with
the -Dl flags), 'mouse dump' shows mouse events.


Simon Glass (6):
  Add a few floating-point routines
  input: Add mouse support
  sandbox: sdl: Add support for mouse input
  usb: Add a USB mouse driver
  input: Add a command to show mouse input
  sandbox: Enable the mouse

 arch/sandbox/cpu/sdl.c         |  48 ++++-
 arch/sandbox/dts/sandbox.dtsi  |   4 +
 arch/sandbox/include/asm/sdl.h |   4 +
 cmd/Kconfig                    |   9 +
 cmd/Makefile                   |   1 +
 cmd/mouse.c                    |  70 +++++++
 drivers/input/Kconfig          |  17 ++
 drivers/input/Makefile         |   4 +
 drivers/input/mouse-uclass.c   |  28 +++
 drivers/input/sandbox_mouse.c  |  35 ++++
 drivers/input/usb_mouse.c      | 325 +++++++++++++++++++++++++++++++++
 include/dm/uclass-id.h         |   1 +
 include/mouse.h                |  78 ++++++++
 include/usb.h                  |   1 +
 include/vsprintf.h             |  25 +++
 lib/Kconfig                    |  13 ++
 lib/Makefile                   |   1 +
 lib/strtof.c                   | 200 ++++++++++++++++++++
 18 files changed, 859 insertions(+), 5 deletions(-)
 create mode 100644 cmd/mouse.c
 create mode 100644 drivers/input/mouse-uclass.c
 create mode 100644 drivers/input/sandbox_mouse.c
 create mode 100644 drivers/input/usb_mouse.c
 create mode 100644 include/mouse.h
 create mode 100644 lib/strtof.c