2 .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
4 .\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the
5 .\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH HID 7D "Aug 21, 2009"
8 hid \- Human interface device (HID) class driver
12 \fBkeyboard@unit-address\fR
13 \fBmouse@unit-address\fR
14 \fBinput@unit-address:consumer_control\fR
15 \fB#include <sys/hid.h>\fR
16 \fBint ioctl(int fildes, int command, ... /*arg*/);\fR
22 The \fBhid\fR driver is a USBA (Solaris USB Architecture) compliant client
23 driver that supports the \fIHuman Interface Device Class (HID) 1.0\fR
24 specification. The Human Interface Device (HID) class encompasses devices
25 controlled by humans to operate computer systems. Typical examples of HID
26 devices include keyboards, mice, trackballs, and joysticks. HID also covers
27 front-panel controls such as knobs, switches, and buttons. A USB device with
28 multiple interfaces may have one interface for audio and a HID interface to
29 define the buttons that control the audio.
32 The \fBhid\fR driver is general and primarily handles the USB functionality of
33 the device and generic HID functionality. For example, HID interfaces are
34 required to have an interrupt pipe for the device to send data packets, and the
35 \fBhid\fR driver opens the pipe to the interrupt endpoint and starts polling.
36 The \fBhid\fR driver is also responsible for managing the device through the
37 default control pipe. In addition to being a USB client driver, the \fBhid\fR
38 driver is also a STREAMS driver so that modules may be pushed on top of it.
41 The HID specification is flexible, and HID devices dynamically describe their
42 packets and other parameters through a HID report descriptor. The HID parser is
43 a misc module that parses the HID report descriptor and creates a database of
44 information about the device. The \fBhid\fR driver queries the HID parser to
45 find out the type and characteristics of the HID device. The HID specification
46 predefines packet formats for the boot protocol keyboard and mouse.
51 \fB\fBHIDIOCKMGDIRECT\fR\fR
54 This ioctl should only be addressed to a USB keyboard or mouse device. The
55 \fBhid\fR driver maintains two streams for each USB keyboard/mouse instance: an
56 internal one for the use of the kernel and an external one for the use of user
57 applications. This ioctl returns the information of which stream gets the input
60 \fIarg\fR must point to a variable of \fBint\fR type. Upon return, \fB0\fR
61 means the internal stream gets the input, \fB1\fR means the external stream
68 \fB\fBHIDIOCKMSDIRECT\fR\fR
71 This ioctl should only be addressed to a USB keyboard or mouse device. The hid
72 driver maintains two streams for each USB keyboard/mouse instance: an internal
73 one for the use of the kernel and an external one for the use of user
74 applications. This ioctl sets which stream should get the input for the moment.
76 \fIarg\fR must point to a variable of \fBint\fR type. The argument \fB0\fR
77 means the internal stream gets the input, \fB1\fR means the external stream
85 \fB\fB/kernel/drv/hid\fR\fR
89 32-bit x86 ELF kernel hid module
95 \fB\fB/kernel/drv/amd64/hid\fR\fR
99 64-bit x86 ELF kernel hid module
105 \fB\fB/kernel/drv/sparcv9/hid\fR\fR
109 64-bit SPARC ELF kernel hid module
115 \fB\fB/kernel/misc/hidparser\fR\fR
119 32-bit x86 ELF kernel hidparser module
125 \fB\fB/kernel/misc/amd64/hidparser\fR\fR
129 64-bit x86 ELF kernel hidparser module
135 \fB\fB/kernel/misc/sparcv9/hidparser\fR\fR
139 64-bit SPARC ELF kernel hidparser module
145 See \fBattributes\fR(5) for descriptions of the following attributes:
153 ATTRIBUTE TYPE ATTRIBUTE VALUE
155 Architecture SPARC, x86, PCI-based systems
161 \fBcfgadm_usb\fR(1M), \fBattributes\fR(5), \fBusba\fR(7D), \fBvirtualkm\fR(7D)
164 \fIWriting Device Drivers\fR
167 \fISTREAMS Programming Guide\fR
170 \fIUniversal Serial Bus Specification 1.0 and 1.1\fR
173 \fIDevice Class Definition for Human Interface Devices (HID) 1.1\fR
176 \fISystem Administration Guide: Basic Administration\fR
179 \fIhttp://www.sun.com\fR
184 \fBhid_attach: Unsupported HID device.\fR
188 The device requires a protocol not supported by the hid driver.
194 \fBParsing of hid descriptor failed.\fR
198 The HID report descriptor cannot be parsed correctly. The device cannot be
199 supported by the hid driver.
205 \fBInvalid report descriptor.\fR
209 The HID report descriptor is invalid. The device cannot be supported by the hid
215 The following messages may be logged into the system log. They are formatted in
216 the following manner:
220 <device path><hid<instance number>): message...
228 \fBhid_attach: Unsupported HID device.\fR
232 The device cannot be supported by this version of the HID driver.
238 \fBParsing of HID descriptor failed.\fR
242 The device cannot be supported by this version of the HID driver.
248 \fBInvalid report descriptor.\fR
252 The device cannot be supported by this version of the HID driver.
258 The hid driver currently supports only keyboard, mouse and audio HID control
262 Normally a mouse is not power managed and consquently, screen darkening can be
263 undone with a mouse movement. If power management of the mouse is required, add
264 the following line to \fBhid.conf\fR then reboot the system:
274 Modern mice that are power managed require a 'click' to wake up. Occasionally,
275 this may cause unexpected results.