1.\" Copyright (c) 2020 Vladimir Kondratyev <wulf@FreeBSD.org> 2.\" 3.\" Redistribution and use in source and binary forms, with or without 4.\" modification, are permitted provided that the following conditions 5.\" are met: 6.\" 1. Redistributions of source code must retain the above copyright 7.\" notice, this list of conditions and the following disclaimer. 8.\" 2. Redistributions in binary form must reproduce the above copyright 9.\" notice, this list of conditions and the following disclaimer in the 10.\" documentation and/or other materials provided with the distribution. 11.\" 12.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 13.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 14.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 15.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 16.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 17.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 18.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 19.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 20.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 21.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 22.\" SUCH DAMAGE. 23.\" 24.Dd September 19, 2020 25.Dt PS4DSHOCK 4 26.Os 27.Sh NAME 28.Nm ps4dshock 29.Nd Sony PlayStation 4 Dualshock 4 gamepad driver 30.Sh SYNOPSIS 31To compile this driver into the kernel, 32place the following lines in your 33kernel configuration file: 34.Bd -ragged -offset indent 35.Cd "device ps4dshock" 36.Cd "device hid" 37.Cd "device hidbus" 38.Cd "device hidmap" 39.Cd "device evdev" 40.Ed 41.Pp 42Alternatively, to load the driver as a 43module at boot time, place the following line in 44.Xr loader.conf 5 : 45.Bd -literal -offset indent 46ps4dshock_load="YES" 47.Ed 48.Sh DESCRIPTION 49The 50.Nm 51driver provides support for Sony PlayStation 4 Dualshock 4 gamepad driver. 52.Pp 53The 54.Pa /dev/input/event* 55device presents the game controller as a 56.Ar evdev 57type device. 58.Sh SYSCTL VARIABLES 59Next parameters are available as 60.Xr sysctl 8 61variables. 62Debug parameter is available as 63.Xr loader 8 64tunable as well. 65.Bl -tag -width indent 66.It Va dev.p4dshock.*.led_state 67LED state: 0 - off, 1 - on, 2 - blinking. 68.It Va dev.p4dshock.*.led_color_r 69LED color. 70Red component. 71.It Va dev.p4dshock.*.led_color_g 72LED color. 73Green component. 74.It Va dev.p4dshock.*.led_color_b 75LED color. 76Blue component. 77.It Va dev.p4dshock.*.led_delay_on 78LED blink. 79On delay, msecs. 80.It Va dev.p4dshock.*.led_delay_off 81LED blink. 82Off delay, msecs. 83.It Va hw.hid.ps4dshock.debug 84Debug output level, where 0 is debugging disabled and larger values increase 85debug message verbosity. 86Default is 0. 87.El 88.Sh FILES 89.Bl -tag -width /dev/input/event* -compact 90.It Pa /dev/input/event* 91input event device node. 92.El 93.Sh BUGS 94The 95.Nm 96does not support force-feedback events. 97.Sh HISTORY 98The 99.Nm 100driver first appeared in 101.Fx 13.0. 102.Sh AUTHORS 103.An -nosplit 104The 105.Nm 106driver was written by 107.An Vladimir Kondratyev Aq Mt wulf@FreeBSD.org . 108