git: 893e5b702077 - releng/15.0 - hgame.4: Polish

From: Colin Percival <cperciva_at_FreeBSD.org>
Date: Fri, 14 Nov 2025 02:35:17 UTC
The branch releng/15.0 has been updated by cperciva:

URL: https://cgit.FreeBSD.org/src/commit/?id=893e5b702077f2130451a868bd3ca24cdd6acbae

commit 893e5b702077f2130451a868bd3ca24cdd6acbae
Author:     Alexander Ziaee <ziaee@FreeBSD.org>
AuthorDate: 2025-11-13 21:13:45 +0000
Commit:     Colin Percival <cperciva@FreeBSD.org>
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 <wulf@FreeBSD.org>
 .\"
 .\" 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