Message ID | 20250825204022.3655799-1-sjg@u-boot.org |
---|---|
Headers |
Return-Path: <concept-bounces+u-boot-concept=u-boot.org@u-boot.org> X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756154431; bh=Kp78QzUdJLmrqnkw8AZt5t2tS7q0z0vTesGegwbLffw=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=WuNJBvGZXALeJsxi6g5LzxMaVbw0S/V54LlKrojdvyXuP2AZw923MhX8xcCKUfYFC EBrwt9YXf8JjBI4/NiwZTj3VTK8FPJwz02vVKbLsUtw6TJwu9L1ZISWXnZWMPBoqdM bJqx6ZJ5kAmvftCrqgDszsUfVe/yjevvz6a+CfJil6vo7s932jRAO4CC1tv8/nyHDV 9SwBDicJGBR2zIgqWZNGx5pu092AC7EGUL6QOrHMUi/TWPOrNC+Wuwv31+JUalWAXM XHF50NyKoO7jvn+oypqGTlYTQfeDefLyBweReVVlS10SyYp+wmK+p76iMHaX7+q4Cp 7v39imSw7Dsxg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6521D67709 for <u-boot-concept@u-boot.org>; Mon, 25 Aug 2025 14:40:31 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id lZ8c2eDUw0dE for <u-boot-concept@u-boot.org>; Mon, 25 Aug 2025 14:40:31 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756154431; bh=Kp78QzUdJLmrqnkw8AZt5t2tS7q0z0vTesGegwbLffw=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=WuNJBvGZXALeJsxi6g5LzxMaVbw0S/V54LlKrojdvyXuP2AZw923MhX8xcCKUfYFC EBrwt9YXf8JjBI4/NiwZTj3VTK8FPJwz02vVKbLsUtw6TJwu9L1ZISWXnZWMPBoqdM bJqx6ZJ5kAmvftCrqgDszsUfVe/yjevvz6a+CfJil6vo7s932jRAO4CC1tv8/nyHDV 9SwBDicJGBR2zIgqWZNGx5pu092AC7EGUL6QOrHMUi/TWPOrNC+Wuwv31+JUalWAXM XHF50NyKoO7jvn+oypqGTlYTQfeDefLyBweReVVlS10SyYp+wmK+p76iMHaX7+q4Cp 7v39imSw7Dsxg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 45CBB6778A for <u-boot-concept@u-boot.org>; Mon, 25 Aug 2025 14:40:31 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756154429; bh=fuZ+GYUpzAgrBO3ca6NqHdsUXbMJE5Rfd7OlnQ9RjfA=; h=From:To:Cc:Subject:Date:From; b=WcxR/69WP4qbJPMY5zV0ZcWVokk3xkFoLv7E25RKsJSBLTPmq6OLsVJ6Om3DhLgtq F5EF3DUXuJ4AJzEtKDyTszIOzLf6AtPI1BwYcEZlVMo/555par0U5wptiMpIMNA+/D 6KWac+L7Z8qbE7zlREPl/uI3a6/4NcXMTYY1OE6Mw57hEfRC79WWYxGEDtP0490AzE C8sM0jxMBuAq4D0vCSUISDOlJGFKaxOTu5CzGUg6H4Z5Ze86CzIDhg8S4PZqf8tHSC qKTt4xu0D/lVuH7afsc1WzV2hKsEntkTvIjbCaDFlMOSTtWn3zkJqaC+eSxRqCtNFc N2atIzx1beedA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C94E767787; Mon, 25 Aug 2025 14:40:29 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id JAmrJ5YDSTSN; Mon, 25 Aug 2025 14:40:29 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756154429; bh=YjcIwwnaaS11qLmmoi0LKEk0htozWAas0+Zi3Wwm2/s=; h=From:To:Cc:Subject:Date:From; b=R6drjKjkOT8vWya8FYOc1eo/F7CEm0vX9nNzXIXfA5OVNueSOjKyYIu59+1Rsj5J4 46bx2ukVi6HEj0mC5gsChrGnhUwPmL5PGCIQWX166Imu2/C6szzouwNheEsDZAacLo mIKNitPeboG8uQIoPuh3stDm62Gnc74pgRD3USh+hQiZSwrIJ89KRkc6srptutH3zw H3yTcGRunihuwsXfO73m14jRp6oBiBBlXF/fUnzgwEjo7GKlp32KVK5ZmPmjC+cvrq TRbNdjRwLq9ZrNjykYGQU0wOH/C40HIUCu3I5vtVPihtzxpNweNJ+XL2dZbRrCdbOJ PBf/1+vH5agAQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 1AF2167709; Mon, 25 Aug 2025 14:40:29 -0600 (MDT) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Mon, 25 Aug 2025 14:40:13 -0600 Message-ID: <20250825204022.3655799-1-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Message-ID-Hash: H4BYF7FOAORS4S377VFNIHWBZDY677UX X-Message-ID-Hash: H4BYF7FOAORS4S377VFNIHWBZDY677UX X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt <xypron.glpk@gmx.de>, Simon Glass <sjg@chromium.org> X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 0/6] Provide basic support for a mouse List-Id: Discussion and patches related to U-Boot Concept <concept.u-boot.org> Archived-At: <https://lists.u-boot.org/archives/list/concept@u-boot.org/message/H4BYF7FOAORS4S377VFNIHWBZDY677UX/> List-Archive: <https://lists.u-boot.org/archives/list/concept@u-boot.org/> List-Help: <mailto:concept-request@u-boot.org?subject=help> List-Owner: <mailto:concept-owner@u-boot.org> List-Post: <mailto:concept@u-boot.org> List-Subscribe: <mailto:concept-join@u-boot.org> List-Unsubscribe: <mailto:concept-leave@u-boot.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
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