1e49fa9f6SVladimir Kondratyev.\" 2e49fa9f6SVladimir Kondratyev.\" Copyright (c) 2010 AnyWi Technologies 3e49fa9f6SVladimir Kondratyev.\" All rights reserved. 4e49fa9f6SVladimir Kondratyev.\" 5e49fa9f6SVladimir Kondratyev.\" Permission to use, copy, modify, and distribute this software for any 6e49fa9f6SVladimir Kondratyev.\" purpose with or without fee is hereby granted, provided that the above 7e49fa9f6SVladimir Kondratyev.\" copyright notice and this permission notice appear in all copies. 8e49fa9f6SVladimir Kondratyev.\" 9e49fa9f6SVladimir Kondratyev.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10e49fa9f6SVladimir Kondratyev.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11e49fa9f6SVladimir Kondratyev.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12e49fa9f6SVladimir Kondratyev.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13e49fa9f6SVladimir Kondratyev.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14e49fa9f6SVladimir Kondratyev.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15e49fa9f6SVladimir Kondratyev.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16e49fa9f6SVladimir Kondratyev.\" 17e49fa9f6SVladimir Kondratyev.Dd September 16, 2020 18e49fa9f6SVladimir Kondratyev.Dt HIDQUIRK 4 19e49fa9f6SVladimir Kondratyev.Os 20e49fa9f6SVladimir Kondratyev.Sh NAME 21e49fa9f6SVladimir Kondratyev.Nm hidquirk 22e49fa9f6SVladimir Kondratyev.Nd HID quirks module 23e49fa9f6SVladimir Kondratyev.Sh SYNOPSIS 24e49fa9f6SVladimir KondratyevTo compile this module into the kernel, 25e49fa9f6SVladimir Kondratyevplace the following line in your 26e49fa9f6SVladimir Kondratyevkernel configuration file: 27e49fa9f6SVladimir Kondratyev.Bd -ragged -offset indent 28e49fa9f6SVladimir Kondratyev.Cd "device hid" 29e49fa9f6SVladimir Kondratyev.Ed 30e49fa9f6SVladimir Kondratyev.Pp 31e49fa9f6SVladimir KondratyevAlternatively, to load the module at boot 32e49fa9f6SVladimir Kondratyevtime, place the following line in 33e49fa9f6SVladimir Kondratyev.Xr loader.conf 5 : 34e49fa9f6SVladimir Kondratyev.Bd -literal -offset indent 35e49fa9f6SVladimir Kondratyevhidquirk_load="YES" 36e49fa9f6SVladimir Kondratyev.Ed 37e49fa9f6SVladimir Kondratyev.Sh DESCRIPTION 38e49fa9f6SVladimir KondratyevThe 39e49fa9f6SVladimir Kondratyev.Nm 40e49fa9f6SVladimir Kondratyevmodule provides support for adding quirks for HID devices 41e49fa9f6SVladimir Kondratyev.Bl -tag -width Ds 42e49fa9f6SVladimir Kondratyev.It HQ_HID_IGNORE 43e49fa9f6SVladimir Kondratyevdevice should be ignored by hid class 44e49fa9f6SVladimir Kondratyev.It HQ_KBD_BOOTPROTO 45e49fa9f6SVladimir Kondratyevdevice should set the boot protocol 46e49fa9f6SVladimir Kondratyev.It HQ_MS_BOOTPROTO 47e49fa9f6SVladimir Kondratyevdevice should set the boot protocol 48e49fa9f6SVladimir Kondratyev.It HQ_MS_BAD_CLASS 49e49fa9f6SVladimir Kondratyevdoesn't identify properly 50e49fa9f6SVladimir Kondratyev.It HQ_MS_LEADING_BYTE 51e49fa9f6SVladimir Kondratyevmouse sends an unknown leading byte 52e49fa9f6SVladimir Kondratyev.It HQ_MS_REVZ 53e49fa9f6SVladimir Kondratyevmouse has Z-axis reversed 54*0661cf74SVladimir Kondratyev.It HQ_MS_VENDOR_BTN 55*0661cf74SVladimir Kondratyevmouse has buttons in vendor usage page 56e49fa9f6SVladimir Kondratyev.It HQ_SPUR_BUT_UP 57e49fa9f6SVladimir Kondratyevspurious mouse button up events 58e49fa9f6SVladimir Kondratyev.It HQ_MT_TIMESTAMP 59e49fa9f6SVladimir KondratyevMultitouch device exports HW timestamps 60e49fa9f6SVladimir Kondratyev.Dv 0x1b5a01 61e49fa9f6SVladimir Kondratyev.El 62e49fa9f6SVladimir Kondratyev.Pp 63e49fa9f6SVladimir KondratyevSee 64e49fa9f6SVladimir Kondratyev.Pa /sys/dev/hid/hidquirk.h 65e49fa9f6SVladimir Kondratyevfor the complete list of supported quirks. 66e49fa9f6SVladimir Kondratyev.Sh LOADER TUNABLE 67e49fa9f6SVladimir KondratyevThe following tunable can be set at the 68e49fa9f6SVladimir Kondratyev.Xr loader 8 69e49fa9f6SVladimir Kondratyevprompt before booting the kernel, or stored in 70e49fa9f6SVladimir Kondratyev.Xr loader.conf 5 . 71e49fa9f6SVladimir Kondratyev.Bl -tag -width indent 72e49fa9f6SVladimir Kondratyev.It Va hw.hid.quirk.%d 73e49fa9f6SVladimir KondratyevThe value is a string whose format is: 74e49fa9f6SVladimir Kondratyev.Bd -literal -offset indent 75e49fa9f6SVladimir Kondratyev.Qo BusId VendorId ProductId LowRevision HighRevision HQ_QUIRK,... Qc 76e49fa9f6SVladimir Kondratyev.Ed 77e49fa9f6SVladimir Kondratyev.Pp 78e49fa9f6SVladimir KondratyevInstalls the quirks 79e49fa9f6SVladimir Kondratyev.Ic HQ_QUIRK,... 80e49fa9f6SVladimir Kondratyevfor all HID devices matching 81e49fa9f6SVladimir Kondratyev.Ic BusId 82e49fa9f6SVladimir Kondratyevand 83e49fa9f6SVladimir Kondratyev.Ic VendorId 84e49fa9f6SVladimir Kondratyevand 85e49fa9f6SVladimir Kondratyev.Ic ProductId 86e49fa9f6SVladimir Kondratyevwhich have a hardware revision between and including 87e49fa9f6SVladimir Kondratyev.Ic LowRevision 88e49fa9f6SVladimir Kondratyevand 89e49fa9f6SVladimir Kondratyev.Ic HighRevision . 90e49fa9f6SVladimir Kondratyev.Pp 91e49fa9f6SVladimir Kondratyev.Ic BusId , 92e49fa9f6SVladimir Kondratyev.Ic VendorId , 93e49fa9f6SVladimir Kondratyev.Ic ProductId , 94e49fa9f6SVladimir Kondratyev.Ic LowRevision 95e49fa9f6SVladimir Kondratyevand 96e49fa9f6SVladimir Kondratyev.Ic HighRevision 97e49fa9f6SVladimir Kondratyevare all 16 bits numbers which can be decimal or hexadecimal based. 98e49fa9f6SVladimir Kondratyev.Pp 99e49fa9f6SVladimir KondratyevA maximum of 100 variables 100e49fa9f6SVladimir Kondratyev.Ic hw.hid.quirk.0, .1, ..., .99 101e49fa9f6SVladimir Kondratyevcan be defined. 102e49fa9f6SVladimir Kondratyev.Pp 103e49fa9f6SVladimir KondratyevIf a matching entry is found in the kernel's internal quirks table, it 104e49fa9f6SVladimir Kondratyevis replaced by the new definition. 105e49fa9f6SVladimir Kondratyev.Pp 106e49fa9f6SVladimir KondratyevElse a new entry is created given that the quirk table is not full. 107e49fa9f6SVladimir Kondratyev.Pp 108e49fa9f6SVladimir KondratyevThe kernel iterates over the 109e49fa9f6SVladimir Kondratyev.Ic hw.hid.quirk.N 110e49fa9f6SVladimir Kondratyevvariables starting at 111e49fa9f6SVladimir Kondratyev.Ic N = 0 112e49fa9f6SVladimir Kondratyevand stops at 113e49fa9f6SVladimir Kondratyev.Ic N = 99 114e49fa9f6SVladimir Kondratyevor the first non-existing one. 115e49fa9f6SVladimir Kondratyev.El 116e49fa9f6SVladimir Kondratyev.Sh EXAMPLES 117e49fa9f6SVladimir KondratyevTo install a quirk at boot time, place one or several lines like the 118e49fa9f6SVladimir Kondratyevfollowing in 119e49fa9f6SVladimir Kondratyev.Xr loader.conf 5 : 120e49fa9f6SVladimir Kondratyev.Bd -literal -offset indent 121e49fa9f6SVladimir Kondratyevhw.hid.quirk.0="0x18 0x6cb 0x1941 0 0xffff HQ_MT_TIMESTAMP" 122e49fa9f6SVladimir Kondratyev.Ed 123e49fa9f6SVladimir Kondratyev.Sh HISTORY 124e49fa9f6SVladimir KondratyevThe 125e49fa9f6SVladimir Kondratyev.Nm 126e49fa9f6SVladimir Kondratyevmodule appeared in 127e49fa9f6SVladimir Kondratyev.Fx 13.0 . 128e49fa9f6SVladimir Kondratyev.Sh AUTHORS 129e49fa9f6SVladimir Kondratyev.An -nosplit 130e49fa9f6SVladimir KondratyevThe 131e49fa9f6SVladimir Kondratyev.Nm 132e49fa9f6SVladimir Kondratyevdriver was written by 133e49fa9f6SVladimir Kondratyev.An Hans Petter Selasky Aq Mt hselasky@FreeBSD.org 134e49fa9f6SVladimir Kondratyevfor 135e49fa9f6SVladimir Kondratyev.Xr usb 4 136e49fa9f6SVladimir Kondratyevsubsystem and adopted to 137e49fa9f6SVladimir Kondratyev.Xr hid 4 138e49fa9f6SVladimir Kondratyevby 139e49fa9f6SVladimir Kondratyev.An Vladimir Kondratyev Aq Mt wulf@FreeBSD.org . 140e49fa9f6SVladimir KondratyevThis manual page is based on 141e49fa9f6SVladimir Kondratyev.Xr usb_quirk 4 142e49fa9f6SVladimir Kondratyevmanual page written by 143e49fa9f6SVladimir Kondratyev.An Nick Hibma Aq Mt n_hibma@FreeBSD.org . 144