From nobody Thu Nov 13 23:58:25 2025 X-Original-To: dev-commits-src-main@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 4d6y020C2Zz6GStm; Thu, 13 Nov 2025 23:58:26 +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 4d6y016pTBz3TYY; Thu, 13 Nov 2025 23:58:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763078306; 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=7Ba023WVbuzl1gxHtfXinWsUcw2CXcQ+unJhiKLVCGA=; b=i25FFjsGzs4SUXrBkLvIgfUh2GLTU5zzBcLtPmIskjYea/XPyG9qixVv6k+oqHTzJjHhOC pSu9qjZaTtLzcie/1Oo+oEW6MLaOP1nDFj0Loomyr9nXcKOL+h+5WzPj+xyqDjWsgapzBc /EwYquWDHoqscAj1CgMBSslU/lq7rk8o7CFS412LV2jZHjTw5fz00sLr9Ir99f527cjq9Y AjFxLCyEtLxjnmOT9Tx1BK3KFajb8jG8eY2D5ZhmVoSWmncI3t4pSi2sLPUXElIo09s3n2 afB2HGrmtAzcn8PgK0CauZDv//kCncXMGtOCerhMrQagTbLSgcyU9A6KM8NdYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763078306; 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=7Ba023WVbuzl1gxHtfXinWsUcw2CXcQ+unJhiKLVCGA=; b=N/T3mK1hrqcaC5j2fLHmg1Kh5M1y6b92YeLp2vxtllSryFKuz9k4iPcGve1WORKHLhAprH uOcBeSWMEn+N39qvO5qPbhZUYu/9AINiqFHlu0RpTqJ07HujPtO5GUVpToxYApE5SS4cXB WIye7RLHzE67beFZ/fNbQvrLNYxy72t3xtKka9BZQljnYPcnWcGa6FI6xj8aksqpk/pXeH 8j7s0inLyVPyqpOWNZTPNdJBpwjEHgaHnBayBjiCvY9rtrB9Q4GEa9RLUhEgCoVySs3Ww9 NcVa2GQjQfemJ2EbZ3zESN62s6Dl2EYKLef2+hq6Y/MLBoKebcVU48Poopy6Jw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763078306; a=rsa-sha256; cv=none; b=akzlT64S6xWtplxCaYHsNOlgMpe3sYoFE3Lm9SHxiZ8bM79/Z3EJXYhCmrqKL0LP7sjogH /piSN2+1Lv4AXS4xLoQ6c9Jxt17ouKCY/YBkWYR7CGU78Ho+HWXkZvhqL8G60pjiEmi/1d 9Kbjex6YBH228HmUWuNQ981/i0xw5IX/Tuvnb2rcfWS7PUIamfI+xpf9yLNeCCpCrUO4k+ dt8aU3/MiLwajYAMDYwp0CQDZP+qvnWGajaM8ZQjX8Zw/QiPwKzFeuwQ8CobxVyaUUnTVW 4zBoAXF/i8PChBj3Uquc+04S5ULSoM2hsRq6sgPyQPrmQRzJVrT2X2j1/MHheQ== 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 4d6y016BBfzjWS; Thu, 13 Nov 2025 23:58:25 +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 5ADNwPnh098801; Thu, 13 Nov 2025 23:58:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ADNwPAQ098798; Thu, 13 Nov 2025 23:58:25 GMT (envelope-from git) Date: Thu, 13 Nov 2025 23:58:25 GMT Message-Id: <202511132358.5ADNwPAQ098798@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: c0c8d812b560 - main - hgame.4: Polish List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c0c8d812b560a3e89656c026022a44631f88e233 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=c0c8d812b560a3e89656c026022a44631f88e233 commit c0c8d812b560a3e89656c026022a44631f88e233 Author: Alexander Ziaee AuthorDate: 2025-11-13 21:13:45 +0000 Commit: Alexander Ziaee CommitDate: 2025-11-13 23:57:59 +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. MFC after: immediately for inclusion in 15.0R Reviewed by: wulf Differential Revision: https://reviews.freebsd.org/D53290 --- 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