From patchwork Mon Oct 6 20:58:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 520 Return-Path: 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=1759784369; bh=fH41LbotBVScFnvECyK9JS4PWiLhax6sJPO/CooHrlk=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=XIYDhZJV7CQwWPM8L8VmygGMTy3hXPnShuePodx+jTQBGHP047LWb41cNRORM+QbX mj2q3EJXe/Q3ylHEwoFOshuxugSjRqTZe6Jpne7nK2xZXjawyYtJaaSlelbsc87kfm C1XhcU5hZf7NCy62iNaeYMewWDiPqlcp993VDOHXbYU+y9Ts6+1ePPhR/wyFl5Hjtn 9N9OfQiRrtUjEi3R2zd+zsuv6BmhtUnWlDGkh30J+lbDQ9UqrNZL8pv/Xdo7UYCNwe hxT/Rvktw0cIi/nAIpQzZ/kQzGYIunpgoRq0W/j06ap7mjXBaZcCly9lW8FFc/mXyc dDviNCrT24apA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 2EE2767F8D for ; Mon, 6 Oct 2025 14:59: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 10024) with ESMTP id DRPdaNActDNY for ; Mon, 6 Oct 2025 14:59:29 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759784369; bh=fH41LbotBVScFnvECyK9JS4PWiLhax6sJPO/CooHrlk=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=XIYDhZJV7CQwWPM8L8VmygGMTy3hXPnShuePodx+jTQBGHP047LWb41cNRORM+QbX mj2q3EJXe/Q3ylHEwoFOshuxugSjRqTZe6Jpne7nK2xZXjawyYtJaaSlelbsc87kfm C1XhcU5hZf7NCy62iNaeYMewWDiPqlcp993VDOHXbYU+y9Ts6+1ePPhR/wyFl5Hjtn 9N9OfQiRrtUjEi3R2zd+zsuv6BmhtUnWlDGkh30J+lbDQ9UqrNZL8pv/Xdo7UYCNwe hxT/Rvktw0cIi/nAIpQzZ/kQzGYIunpgoRq0W/j06ap7mjXBaZcCly9lW8FFc/mXyc dDviNCrT24apA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 17EC667F52 for ; Mon, 6 Oct 2025 14:59:29 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759784367; bh=ENIplAD0Dw7+qzECrb4Q9LFqskpffsewB+Bu7e9TujU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sVoMt9Kv+AJo5Yi3Lf3PtICh+xFRzSBZG5xvgQqVE+XCyRDmdBLHCaVjcMOaLKa+0 xCaCRzeyHdNPIf0ZxAPF7EzL3zc3ZZEL0ovz80y76nAtL625oD8vrfMlWD+HADrY4h WnWngTFrBAzft2xBbOWvRk/ruKthDErFQJaMerEhDKTEofvaFOHQDD5NSyMbHcUfZL k7IOUI7rz72kBNqPVxFiJ4Yr8QDsVK7GEEDhikMvU/J88yZConM07Wh0m0fxZtyT9U KEr0sLUSo9mAheGnFCr/CmlFtiqsMO7daky3QJ1rZ4I9bDwXTcZK1BUxC9LxuJZAkI 7tpYbCKBhkFmQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 4737F67F03; Mon, 6 Oct 2025 14:59:27 -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 A4GIcrxs-yFj; Mon, 6 Oct 2025 14:59:27 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759784363; bh=CBhZua/OKcuLh/Hxsyj4AKrosR4eJtcN7o7aNPsdUqk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LjAyU18a8ep7YwZ5uqxDGQpg4LFPxEjH08RdMo5zcBcN+lc8fw/MJvzg5Kq0cHjV7 pfot/2OIcJK0fMd8XUqahATM1Dqb+UhepV9yZYJjN90Knsqf3qbJdqw01cJ2uTZKff ucCFi/klwmtAXQsTx8pSp7mdzVkdvL5I2HbBJZTDmS7q5gzaboEICaLE8c2D3hb7bX gZnGnOVsdNBuS8LsPglO0HhrZPjkKndss7/JBURoOKZKiy6Wp/1OQJnR3Jo1HWRUwk wT4gTRh6H7bo6XYxlYNa2rcdALRHOVysmsEMF5YGObFL5rGNpGqP7BjZr6TqT+kDNx QBu7B9dNTG9NA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id E3DFB67EE4; Mon, 6 Oct 2025 14:59:22 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Mon, 6 Oct 2025 14:58:37 -0600 Message-ID: <20251006205856.2009292-4-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251006205856.2009292-1-sjg@u-boot.org> References: <20251006205856.2009292-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: XDWUAL3CT2C7NWWNWVR4OR6J2UOJ7NDP X-Message-ID-Hash: XDWUAL3CT2C7NWWNWVR4OR6J2UOJ7NDP 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 , Simon Glass , Claude X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 03/14] mouse: Add comment for mouse_get_event() List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Document the mouse_get_event() function to explain what it does and its return values. Co-developed-by: Claude Signed-off-by: Simon Glass --- include/mouse.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/include/mouse.h b/include/mouse.h index 7fe263b289f..8212a1e89d4 100644 --- a/include/mouse.h +++ b/include/mouse.h @@ -86,11 +86,35 @@ struct mouse_event { }; struct mouse_ops { + /** + * mouse_get_event() - Get a mouse event + * + * Gets the next available mouse event from the device. This can be a + * motion event (mouse movement) or a button event (button press or + * release). + * + * @dev: Mouse device + * @event: Returns the mouse event + * Returns: 0 if OK, -EAGAIN if no event available, -ENOSYS if not + * supported + */ int (*get_event)(struct udevice *dev, struct mouse_event *event); }; #define mouse_get_ops(dev) ((struct mouse_ops *)(dev)->driver->ops) +/** + * mouse_get_event() - Get a mouse event + * + * Gets the next available mouse event from the device. This can be a + * motion event (mouse movement) or a button event (button press or + * release). + * + * @dev: Mouse device + * @event: Returns the mouse event + * Returns: 0 if OK, -EAGAIN if no event available, -ENOSYS if not + * supported + */ int mouse_get_event(struct udevice *dev, struct mouse_event *event); /**