From nobody Fri Nov 14 02:35:17 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d71T16HZqz6Gj3D; Fri, 14 Nov 2025 02:35:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d71T13R4mz3tHP; Fri, 14 Nov 2025 02:35:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763087717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ycyWdbKagLtWFY1mdUmvF+nn3WHFUA1duLVAoqYFpOI=; b=tGCIMVxpPNyPKQF2ttqxiII7+N/xxa4453T2bcbKvkOi5AwypMqnocBVzHf/j7+eI+Dmxs 24F3RBa5lSTOAkoFXYwdzp3Ozq2mP3QMgA61lF2GNe4Do0h622gfMeE79qIYo7O9y6kBNd SEOqWcjbJazumTpWyl2F7h8SJ0PBIzHbrh0RbtLpjsvi2nPLmdL+h8srfoIX5sR/bPbWta r+ZkMfl+cLvG64tiEZjNymBXcSIfsbCCvFcumUqOVgvQ3d/SoSYecffh/dC66DyucZZURr 5pXdzo97y46RFRcHIDPocO0W6Ifgif8N4m2zYrh2IVus09jfaWgOKzh2nytuQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763087717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ycyWdbKagLtWFY1mdUmvF+nn3WHFUA1duLVAoqYFpOI=; b=aBeWMhjQ/IZjLDeomP1jYyfyQhO4qGcEO20JyBEWghOiHZ23BtxKjgAwBPobNWp0QgV0Fk m+38aVsiCvw/J4BRCqHn9ut9VMYnqehgecTmn2NhtEKSJBZYLhWOOodYA46gI7RQnb5eu4 AbG9iM6yvypmUs2LqX+cYFfi7bQrLo7akSaiSZKFuETp+9qs8zG3/k+rKU5jv16ec3NTIJ W+9AHDb2VRF7wUpaZToNJex/AZyxMz4lWcxwqvjfGnBnSl5DYPdncaIaXEdK6PUD56ybAh NidAbcBZyb1I4WXds/DERDL4ugMKTUD3llSKhMwEcW7JsbTf63yEj9JTPJgz4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763087717; a=rsa-sha256; cv=none; b=bA9aHyQPaUSyNBcFYYQfq8iBJAtLD7Rx+VknFw0enZiogrJhhDb5vYuAHki4jWOMKmRVzp fBrCdlxvpD8jL0ir/CYErPNBfVFqLNqqQ4bwOQtPmuYJ54+d1xVqedAy2RSrp0ut7pa5fx aYW4lIrfWNdwZ+XpxzgQe33m9J5DlqRY2fMsSK06numGaUuwNg6gQ1IIyBwtYcZ7RJemxc DTmaEUYjdAMh/0Vus/pCwY8C1YuW9sf3SilRk/o2yT09w9Bk8b9eLn4Bmj76J3nYPgvOhe MFy8p8K62BaejQH9rHtvJcYFSef1NRT3ONq/rDcoaTLzjwWyKeA69nat9yk3Vw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d71T12bxqzp3y; Fri, 14 Nov 2025 02:35:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5AE2ZHnG000242; Fri, 14 Nov 2025 02:35:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AE2ZHUd000239; Fri, 14 Nov 2025 02:35:17 GMT (envelope-from git) Date: Fri, 14 Nov 2025 02:35:17 GMT Message-Id: <202511140235.5AE2ZHUd000239@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 893e5b702077 - releng/15.0 - hgame.4: Polish List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 893e5b702077f2130451a868bd3ca24cdd6acbae Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=893e5b702077f2130451a868bd3ca24cdd6acbae commit 893e5b702077f2130451a868bd3ca24cdd6acbae Author: Alexander Ziaee AuthorDate: 2025-11-13 21:13:45 +0000 Commit: Colin Percival CommitDate: 2025-11-14 02:34:48 +0000 hgame.4: Polish Explain driver loading and application access in the body of the manual. Crossreference other game controller driver manuals, and devfs.rules to hint about how to configure application access. Add a common dongle to supported hardware. Add evdev a few places to make it really clear how it works. Approved by: re (cperciva) MFC after: immediately for inclusion in 15.0R Reviewed by: wulf Differential Revision: https://reviews.freebsd.org/D53290 (cherry picked from commit c0c8d812b560a3e89656c026022a44631f88e233) (cherry picked from commit 31e7ee6bd524813aa2623fb9dc2afcf6be34397e) --- share/man/man4/hgame.4 | 90 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 58 insertions(+), 32 deletions(-) diff --git a/share/man/man4/hgame.4 b/share/man/man4/hgame.4 index 3309833c1720..f816d2a442d0 100644 --- a/share/man/man4/hgame.4 +++ b/share/man/man4/hgame.4 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2020 Vladimir Kondratyev .\" .\" Redistribution and use in source and binary forms, with or without @@ -21,45 +24,62 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 14, 2020 +.Dd November 12, 2025 .Dt HGAME 4 .Os .Sh NAME .Nm hgame -.Nd Generic HID game controller (joystick/gamepad) driver +.Nd generic HID gamepad, joystick, and controller evdev driver .Sh SYNOPSIS -To compile this driver into the kernel, -place the following lines in your -kernel configuration file: -.Bd -ragged -offset indent -.Cd "device hgame" -.Cd "device hid" -.Cd "device hidbus" -.Cd "device hidmap" -.Cd "device evdev" -.Ed +.Cd device hgame +.Cd device hid +.Cd device hidbus +.Cd device hidmap +.Cd device evdev +.Pp +In +.Xr sysctl.conf 5 : +.Cd dev.hgame.X.debug .Pp -Alternatively, to load the driver as a -module at boot time, place the following line in +In .Xr loader.conf 5 : -.Bd -literal -offset indent -hgame_load="YES" -.Ed +.Cd hw.hid.hgame.debug +.Cd hgame_load .Sh DESCRIPTION The .Nm -driver provides support for generic game controllers (joysticks/gamepads) -that attach to the HID transport backend. -See -.Xr iichid 4 -or -.Xr usbhid 4 . +driver supports generic game controllers +that attach to the HID transport backend, +and presents them to applications over the +.Sy evdev +interface. .Pp -The +If the appropriate hardware is detected, +the driver will be loaded automatically by +.Xr devmatch 8 . +To load the driver manually at boot time, set the +.Va hgame_load +variable to +.Ar YES +at the +.Xr loader 8 +prompt, or add it to +.Xr loader.conf 5 . +.Pp +To give user applications access to the game controllers, +allow user access to the .Pa /dev/input/event* -device presents the game controller as a -.Ar evdev -type device. +nodes with +.Xr devfs.rules 5 . +.Sh HARDWARE +The +.Nm +driver supports HID gamepads, joysticks, and controllers such as: +.Pp +.Bl -bullet -compact +.It +8bitdo USB Wireless Adapter 2 +.El .Sh SYSCTL VARIABLES The following variable is available as both .Xr sysctl 8 @@ -68,8 +88,9 @@ variable and tunable: .Bl -tag -width indent .It Va dev.hgame.X.debug -Debug output level, where 0 is debugging disabled and larger values increase -debug message verbosity. +Debug output level, +where 0 is debugging disabled and +larger values increase debug message verbosity. Default is 0. .El .Pp @@ -80,13 +101,18 @@ tunable: .It Va hw.hid.hgame.debug .El .Sh FILES -.Bl -tag -width /dev/input/event* -compact +.Bl -tag -width "/dev/input/event*" -compact .It Pa /dev/input/event* -input event device node. +input event device +.Pq Sy evdev +node .El .Sh SEE ALSO .Xr iichid 4 , -.Xr usbhid 4 +.Xr ps4dshock 4 , +.Xr usbhid 4 , +.Xr xb360gp 4 , +.Xr devfs.rules 5 .Sh HISTORY The .Nm