1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
<table class="head">
<tr>
<td class="head-ltitle">HIDQUIRK(4)</td>
<td class="head-vol">Device Drivers Manual</td>
<td class="head-rtitle">HIDQUIRK(4)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">hidquirk</code> — <span class="Nd">HID
quirks module</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<p class="Pp">To compile this module into the kernel, place the following line
in your kernel configuration file:</p>
<div class="Bd Pp Bd-indent"><code class="Cd">device hid</code></div>
<p class="Pp">Alternatively, to load the module at boot time, place the
following line in <a class="Xr">loader.conf(5)</a>:</p>
<div class="Bd Pp Bd-indent Li">
<pre>hidquirk_load="YES"</pre>
</div>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">The <code class="Nm">hidquirk</code> module provides support for
adding quirks for HID devices</p>
<dl class="Bl-tag">
<dt>HQ_HID_IGNORE</dt>
<dd>device should be ignored by hid class</dd>
<dt>HQ_KBD_BOOTPROTO</dt>
<dd>device should set the boot protocol</dd>
<dt>HQ_MS_BOOTPROTO</dt>
<dd>device should set the boot protocol</dd>
<dt>HQ_MS_BAD_CLASS</dt>
<dd>doesn't identify properly</dd>
<dt>HQ_MS_LEADING_BYTE</dt>
<dd>mouse sends an unknown leading byte</dd>
<dt>HQ_MS_REVZ</dt>
<dd>mouse has Z-axis reversed</dd>
<dt>HQ_MS_VENDOR_BTN</dt>
<dd>mouse has buttons in vendor usage page</dd>
<dt>HQ_SPUR_BUT_UP</dt>
<dd>spurious mouse button up events</dd>
<dt>HQ_MT_TIMESTAMP</dt>
<dd>Multitouch device exports HW timestamps
<code class="Dv">0x1b5a01</code></dd>
</dl>
<p class="Pp">See <span class="Pa">/sys/dev/hid/hidquirk.h</span> for the
complete list of supported quirks.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="LOADER_TUNABLE"><a class="permalink" href="#LOADER_TUNABLE">LOADER
TUNABLE</a></h1>
<p class="Pp">The following tunable can be set at the
<a class="Xr">loader(8)</a> prompt before booting the kernel, or stored in
<a class="Xr">loader.conf(5)</a>.</p>
<dl class="Bl-tag">
<dt id="hw.hid.quirk._d"><var class="Va">hw.hid.quirk.%d</var></dt>
<dd>The value is a string whose format is:
<div class="Bd Pp Bd-indent Li">
<pre>"BusId VendorId ProductId LowRevision HighRevision HQ_QUIRK,..."</pre>
</div>
<p class="Pp">Installs the quirks <code class="Ic">HQ_QUIRK,...</code> for
all HID devices matching <code class="Ic">BusId</code> and
<code class="Ic">VendorId</code> and <code class="Ic">ProductId</code>
which have a hardware revision between and including
<code class="Ic">LowRevision</code> and
<code class="Ic">HighRevision</code>.</p>
<p class="Pp"><code class="Ic">BusId</code>,
<code class="Ic">VendorId</code>, <code class="Ic">ProductId</code>,
<code class="Ic">LowRevision</code> and
<code class="Ic">HighRevision</code> are all 16 bits numbers which can
be decimal or hexadecimal based.</p>
<p class="Pp">A maximum of 100 variables <code class="Ic">hw.hid.quirk.0,
.1, ..., .99</code> can be defined.</p>
<p class="Pp">If a matching entry is found in the kernel's internal quirks
table, it is replaced by the new definition.</p>
<p class="Pp">Else a new entry is created given that the quirk table is not
full.</p>
<p class="Pp">The kernel iterates over the
<code class="Ic">hw.hid.quirk.N</code> variables starting at
<code class="Ic">N = 0</code> and stops at <code class="Ic">N =
99</code> or the first non-existing one.</p>
</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="EXAMPLES"><a class="permalink" href="#EXAMPLES">EXAMPLES</a></h1>
<p class="Pp">To install a quirk at boot time, place one or several lines like
the following in <a class="Xr">loader.conf(5)</a>:</p>
<div class="Bd Pp Bd-indent Li">
<pre>hw.hid.quirk.0="0x18 0x6cb 0x1941 0 0xffff HQ_MT_TIMESTAMP"</pre>
</div>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<p class="Pp">The <code class="Nm">hidquirk</code> module appeared in
<span class="Ux">FreeBSD 13.0</span>.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<p class="Pp">The <code class="Nm">hidquirk</code> driver was written by
<span class="An">Hans Petter Selasky</span>
<<a class="Mt" href="mailto:hselasky@FreeBSD.org">hselasky@FreeBSD.org</a>>
for <a class="Xr">usb(4)</a> subsystem and adopted to
<a class="Xr">hid(4)</a> by <span class="An">Vladimir Kondratyev</span>
<<a class="Mt" href="mailto:wulf@FreeBSD.org">wulf@FreeBSD.org</a>>.
This manual page is based on <a class="Xr">usb_quirk(4)</a> manual page
written by <span class="An">Nick Hibma</span>
<<a class="Mt" href="mailto:n_hibma@FreeBSD.org">n_hibma@FreeBSD.org</a>>.</p>
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">September 16, 2020</td>
<td class="foot-os">FreeBSD 15.0</td>
</tr>
</table>
|