From nobody Fri Nov 14 00:15:30 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 4d6yMk2PK7z6GVGT; Fri, 14 Nov 2025 00:15:30 +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 4d6yMk1Jdxz3Ymp; Fri, 14 Nov 2025 00:15:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763079330; 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=bPSmIsxJi4TsZejLnCL/j7R5DJ3pFpW9txgktzq6T00=; b=vogtMIoUJPFATCiZJ8E8elY1eOLAOy3gWTQPYRnovRpDuOrvI2zYNzGvGV7Nt5aGpK1j7+ 7BxNWtYghxDetNrlxKr8NlpcDPmJEvzXDjCH1O8CUnV9EAszSft92Yy9WAqp96cPSL3km6 2SgkBz4tmFeABSKkX/Jf6Qfg2wN+js9QAKZAh2FHTh6UwZKf86lW6KHScJwUpQkCNdHaGI pi/FI1Dd5xrdvrKRXa5ptgVz72IWaXkymAIRoOOcqJ5YJGV9czfv74OlGBQGhDmSKel6EX BEtsesBod8gp6mWecu9eQ5JkzAdLy7FKt6oTSS/snIww/3aEkAG4l2cwcHYSNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763079330; 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=bPSmIsxJi4TsZejLnCL/j7R5DJ3pFpW9txgktzq6T00=; b=EQafFfcSIRo1d5EOVz1G1tDp0YK+RpLx3yYWyH6ZsE2XRDmyguk9bMDkJkXcnv9m7r1Csn 12jTLyGsi1BRoboBQv051iUrrNC2QusP9yClxBD0bAgjG5s1XuOXXgcWDGyPqvZyKA7xZQ rzOTVKjKCVFiodeSxxXj9cspA2wg6hY1rB6u86hKI3qwWxuqcnmcKkM64TNQqhic2fLwNu kBySGy8TybIoXYHKLBCBUl8rqmVVszVNcVCmrk5r6OgckQpCuj8s2kcEy4kSijQPTVQI/E mgzM6+3lXIjksXFmFCkrnOfh39lqV+sY5JwfrsTtgdJ6JKklhavaNxn7lZODXw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763079330; a=rsa-sha256; cv=none; b=YGiT0Rh0yjM/MRTPpubSLECJgIcfx1LhKsJGVq9xd/bP8mofAMfaliOA5tdXDjgxr0zaar Mmixs5LIiPS4BQD/embpDhjAHiau8n9nVANUVRYrwD1C4ithDimlwro9qkHsWOmqb7WhEm cZ4qK3YO5vst1dd2SV+JtlaHgdvf7F7Lz2z+zjrYujuudW8v40RWG1y7N6h9+eSfXu6rUn uFzbGf+jRBeTslKh6qreof7P/v/1esf8GE7V0EkauhJ9u5bM9jFB7+E8Srd7PUTGtTxoUc I2aZvq9Pxq+6ZfzR+clQf16ggbupdp7PCnMfkd6Kq2nayOWKfURV1I5eD5jLlQ== 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 4d6yMk0wcFzkRN; Fri, 14 Nov 2025 00:15:30 +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 5AE0FUXF037278; Fri, 14 Nov 2025 00:15:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AE0FUxJ037275; Fri, 14 Nov 2025 00:15:30 GMT (envelope-from git) Date: Fri, 14 Nov 2025 00:15:30 GMT Message-Id: <202511140015.5AE0FUxJ037275@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Ziaee Subject: git: 31e7ee6bd524 - stable/15 - 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: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 31e7ee6bd524813aa2623fb9dc2afcf6be34397e Auto-Submitted: auto-generated The branch stable/15 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=31e7ee6bd524813aa2623fb9dc2afcf6be34397e commit 31e7ee6bd524813aa2623fb9dc2afcf6be34397e Author: Alexander Ziaee AuthorDate: 2025-11-13 21:13:45 +0000 Commit: Alexander Ziaee CommitDate: 2025-11-14 00:11:46 +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 (cherry picked from commit c0c8d812b560a3e89656c026022a44631f88e233) --- 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