€•–ÚŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ%/translations/zh_CN/hid/hid-transport”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ%/translations/zh_TW/hid/hid-transport”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ%/translations/it_IT/hid/hid-transport”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ%/translations/ja_JP/hid/hid-transport”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ%/translations/ko_KR/hid/hid-transport”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ%/translations/pt_BR/hid/hid-transport”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ%/translations/sp_SP/hid/hid-transport”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒHID I/O Transport Drivers”h]”hŒHID I/O Transport Drivers”…””}”(hh¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhh·h²hh³Œ?/var/lib/git/docbuild/linux/Documentation/hid/hid-transport.rst”h´KubhŒ paragraph”“”)”}”(hXThe HID subsystem is independent of the underlying transport driver. Initially, only USB was supported, but other specifications adopted the HID design and provided new transport drivers. The kernel includes at least support for USB, Bluetooth, I2C and user-space I/O drivers.”h]”hXThe HID subsystem is independent of the underlying transport driver. Initially, only USB was supported, but other specifications adopted the HID design and provided new transport drivers. The kernel includes at least support for USB, Bluetooth, I2C and user-space I/O drivers.”…””}”(hhÍh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubh¶)”}”(hhh]”(h»)”}”(hŒ 1) HID Bus”h]”hŒ 1) HID Bus”…””}”(hhÞh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhhÛh²hh³hÊh´K ubhÌ)”}”(hX°The HID subsystem is designed as a bus. Any I/O subsystem may provide HID devices and register them with the HID bus. HID core then loads generic device drivers on top of it. The transport drivers are responsible for raw data transport and device setup/management. HID core is responsible for report-parsing, report interpretation and the user-space API. Device specifics and quirks are handled by all layers depending on the quirk.”h]”hX°The HID subsystem is designed as a bus. Any I/O subsystem may provide HID devices and register them with the HID bus. HID core then loads generic device drivers on top of it. The transport drivers are responsible for raw data transport and device setup/management. HID core is responsible for report-parsing, report interpretation and the user-space API. Device specifics and quirks are handled by all layers depending on the quirk.”…””}”(hhìh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K hhÛh²hubhŒ literal_block”“”)”}”(hX›+-----------+ +-----------+ +-----------+ +-----------+ | Device #1 | | Device #i | | Device #j | | Device #k | +-----------+ +-----------+ +-----------+ +-----------+ \\ // \\ // +------------+ +------------+ | I/O Driver | | I/O Driver | +------------+ +------------+ || || +------------------+ +------------------+ | Transport Driver | | Transport Driver | +------------------+ +------------------+ \___ ___/ \ / +----------------+ | HID Core | +----------------+ / | | \ / | | \ ____________/ | | \_________________ / | | \ / | | \ +----------------+ +-----------+ +------------------+ +------------------+ | Generic Driver | | MT Driver | | Custom Driver #1 | | Custom Driver #2 | +----------------+ +-----------+ +------------------+ +------------------+”h]”hX›+-----------+ +-----------+ +-----------+ +-----------+ | Device #1 | | Device #i | | Device #j | | Device #k | +-----------+ +-----------+ +-----------+ +-----------+ \\ // \\ // +------------+ +------------+ | I/O Driver | | I/O Driver | +------------+ +------------+ || || +------------------+ +------------------+ | Transport Driver | | Transport Driver | +------------------+ +------------------+ \___ ___/ \ / +----------------+ | HID Core | +----------------+ / | | \ / | | \ ____________/ | | \_________________ / | | \ / | | \ +----------------+ +-----------+ +------------------+ +------------------+ | Generic Driver | | MT Driver | | Custom Driver #1 | | Custom Driver #2 | +----------------+ +-----------+ +------------------+ +------------------+”…””}”hhüsbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1húh³hÊh´KhhÛh²hubhÌ)”}”(hŒExample Drivers:”h]”hŒExample Drivers:”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K/hhÛh²hubhŒ block_quote”“”)”}”(hŒH- I/O: USB, I2C, Bluetooth-l2cap - Transport: USB-HID, I2C-HID, BT-HIDP ”h]”hŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒI/O: USB, I2C, Bluetooth-l2cap”h]”hÌ)”}”(hj)h]”hŒI/O: USB, I2C, Bluetooth-l2cap”…””}”(hj+h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K1hj'ubah}”(h]”h ]”h"]”h$]”h&]”uh1j%hj"ubj&)”}”(hŒ%Transport: USB-HID, I2C-HID, BT-HIDP ”h]”hÌ)”}”(hŒ$Transport: USB-HID, I2C-HID, BT-HIDP”h]”hŒ$Transport: USB-HID, I2C-HID, BT-HIDP”…””}”(hjBh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K2hj>ubah}”(h]”h ]”h"]”h$]”h&]”uh1j%hj"ubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1j h³hÊh´K1hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÊh´K1hhÛh²hubhÌ)”}”(hŒEverything below "HID Core" is simplified in this graph as it is only of interest to HID device drivers. Transport drivers do not need to know the specifics.”h]”hŒ¡Everything below “HID Core†is simplified in this graph as it is only of interest to HID device drivers. Transport drivers do not need to know the specifics.”…””}”(hjdh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K4hhÛh²hubh¶)”}”(hhh]”(h»)”}”(hŒ1.1) Device Setup”h]”hŒ1.1) Device Setup”…””}”(hjuh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjrh²hh³hÊh´K9ubhÌ)”}”(hXªI/O drivers normally provide hotplug detection or device enumeration APIs to the transport drivers. Transport drivers use this to find any suitable HID device. They allocate HID device objects and register them with HID core. Transport drivers are not required to register themselves with HID core. HID core is never aware of which transport drivers are available and is not interested in it. It is only interested in devices.”h]”hXªI/O drivers normally provide hotplug detection or device enumeration APIs to the transport drivers. Transport drivers use this to find any suitable HID device. They allocate HID device objects and register them with HID core. Transport drivers are not required to register themselves with HID core. HID core is never aware of which transport drivers are available and is not interested in it. It is only interested in devices.”…””}”(hjƒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K;hjrh²hubhÌ)”}”(hŒÚTransport drivers attach a constant "struct hid_ll_driver" object with each device. Once a device is registered with HID core, the callbacks provided via this struct are used by HID core to communicate with the device.”h]”hŒÞTransport drivers attach a constant “struct hid_ll_driver†object with each device. Once a device is registered with HID core, the callbacks provided via this struct are used by HID core to communicate with the device.”…””}”(hj‘h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KBhjrh²hubhÌ)”}”(hXHTransport drivers are responsible for detecting device failures and unplugging. HID core will operate a device as long as it is registered regardless of any device failures. Once transport drivers detect unplug or failure events, they must unregister the device from HID core and HID core will stop using the provided callbacks.”h]”hXHTransport drivers are responsible for detecting device failures and unplugging. HID core will operate a device as long as it is registered regardless of any device failures. Once transport drivers detect unplug or failure events, they must unregister the device from HID core and HID core will stop using the provided callbacks.”…””}”(hjŸh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KFhjrh²hubeh}”(h]”Œ device-setup”ah ]”h"]”Œ1.1) device setup”ah$]”h&]”uh1hµhhÛh²hh³hÊh´K9ubh¶)”}”(hhh]”(h»)”}”(hŒ"1.2) Transport Driver Requirements”h]”hŒ"1.2) Transport Driver Requirements”…””}”(hj¸h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjµh²hh³hÊh´KMubhÌ)”}”(hXíThe terms "asynchronous" and "synchronous" in this document describe the transmission behavior regarding acknowledgements. An asynchronous channel must not perform any synchronous operations like waiting for acknowledgements or verifications. Generally, HID calls operating on asynchronous channels must be running in atomic-context just fine. On the other hand, synchronous channels can be implemented by the transport driver in whatever way they like. They might just be the same as asynchronous channels, but they can also provide acknowledgement reports, automatic retransmission on failure, etc. in a blocking manner. If such functionality is required on asynchronous channels, a transport-driver must implement that via its own worker threads.”h]”hXõThe terms “asynchronous†and “synchronous†in this document describe the transmission behavior regarding acknowledgements. An asynchronous channel must not perform any synchronous operations like waiting for acknowledgements or verifications. Generally, HID calls operating on asynchronous channels must be running in atomic-context just fine. On the other hand, synchronous channels can be implemented by the transport driver in whatever way they like. They might just be the same as asynchronous channels, but they can also provide acknowledgement reports, automatic retransmission on failure, etc. in a blocking manner. If such functionality is required on asynchronous channels, a transport-driver must implement that via its own worker threads.”…””}”(hjÆh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KOhjµh²hubhÌ)”}”(hXØHID core requires transport drivers to follow a given design. A Transport driver must provide two bi-directional I/O channels to each HID device. These channels must not necessarily be bi-directional in the hardware itself. A transport driver might just provide 4 uni-directional channels. Or it might multiplex all four on a single physical channel. However, in this document we will describe them as two bi-directional channels as they have several properties in common.”h]”hXØHID core requires transport drivers to follow a given design. A Transport driver must provide two bi-directional I/O channels to each HID device. These channels must not necessarily be bi-directional in the hardware itself. A transport driver might just provide 4 uni-directional channels. Or it might multiplex all four on a single physical channel. However, in this document we will describe them as two bi-directional channels as they have several properties in common.”…””}”(hjÔh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K[hjµh²hubj)”}”(hX¨- Interrupt Channel (intr): The intr channel is used for asynchronous data reports. No management commands or data acknowledgements are sent on this channel. Any unrequested incoming or outgoing data report must be sent on this channel and is never acknowledged by the remote side. Devices usually send their input events on this channel. Outgoing events are normally not sent via intr, except if high throughput is required. - Control Channel (ctrl): The ctrl channel is used for synchronous requests and device management. Unrequested data input events must not be sent on this channel and are normally ignored. Instead, devices only send management events or answers to host requests on this channel. The control-channel is used for direct blocking queries to the device independent of any events on the intr-channel. Outgoing reports are usually sent on the ctrl channel via synchronous SET_REPORT requests. ”h]”j!)”}”(hhh]”(j&)”}”(hX§Interrupt Channel (intr): The intr channel is used for asynchronous data reports. No management commands or data acknowledgements are sent on this channel. Any unrequested incoming or outgoing data report must be sent on this channel and is never acknowledged by the remote side. Devices usually send their input events on this channel. Outgoing events are normally not sent via intr, except if high throughput is required.”h]”hÌ)”}”(hX§Interrupt Channel (intr): The intr channel is used for asynchronous data reports. No management commands or data acknowledgements are sent on this channel. Any unrequested incoming or outgoing data report must be sent on this channel and is never acknowledged by the remote side. Devices usually send their input events on this channel. Outgoing events are normally not sent via intr, except if high throughput is required.”h]”hX§Interrupt Channel (intr): The intr channel is used for asynchronous data reports. No management commands or data acknowledgements are sent on this channel. Any unrequested incoming or outgoing data report must be sent on this channel and is never acknowledged by the remote side. Devices usually send their input events on this channel. Outgoing events are normally not sent via intr, except if high throughput is required.”…””}”(hjíh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kchjéubah}”(h]”h ]”h"]”h$]”h&]”uh1j%hjæubj&)”}”(hXäControl Channel (ctrl): The ctrl channel is used for synchronous requests and device management. Unrequested data input events must not be sent on this channel and are normally ignored. Instead, devices only send management events or answers to host requests on this channel. The control-channel is used for direct blocking queries to the device independent of any events on the intr-channel. Outgoing reports are usually sent on the ctrl channel via synchronous SET_REPORT requests. ”h]”hÌ)”}”(hXãControl Channel (ctrl): The ctrl channel is used for synchronous requests and device management. Unrequested data input events must not be sent on this channel and are normally ignored. Instead, devices only send management events or answers to host requests on this channel. The control-channel is used for direct blocking queries to the device independent of any events on the intr-channel. Outgoing reports are usually sent on the ctrl channel via synchronous SET_REPORT requests.”h]”hXãControl Channel (ctrl): The ctrl channel is used for synchronous requests and device management. Unrequested data input events must not be sent on this channel and are normally ignored. Instead, devices only send management events or answers to host requests on this channel. The control-channel is used for direct blocking queries to the device independent of any events on the intr-channel. Outgoing reports are usually sent on the ctrl channel via synchronous SET_REPORT requests.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kihjubah}”(h]”h ]”h"]”h$]”h&]”uh1j%hjæubeh}”(h]”h ]”h"]”h$]”h&]”j\j]uh1j h³hÊh´Kchjâubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÊh´Kchjµh²hubhÌ)”}”(hŒqCommunication between devices and HID core is mostly done via HID reports. A report can be of one of three types:”h]”hŒqCommunication between devices and HID core is mostly done via HID reports. A report can be of one of three types:”…””}”(hj%h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Krhjµh²hubj)”}”(hX#- INPUT Report: Input reports provide data from device to host. This data may include button events, axis events, battery status or more. This data is generated by the device and sent to the host with or without requiring explicit requests. Devices can choose to send data continuously or only on change. - OUTPUT Report: Output reports change device states. They are sent from host to device and may include LED requests, rumble requests or more. Output reports are never sent from device to host, but a host can retrieve their current state. Hosts may choose to send output reports either continuously or only on change. - FEATURE Report: Feature reports are used for specific static device features and never reported spontaneously. A host can read and/or write them to access data like battery-state or device-settings. Feature reports are never sent without requests. A host must explicitly set or retrieve a feature report. This also means, feature reports are never sent on the intr channel as this channel is asynchronous. ”h]”j!)”}”(hhh]”(j&)”}”(hX.INPUT Report: Input reports provide data from device to host. This data may include button events, axis events, battery status or more. This data is generated by the device and sent to the host with or without requiring explicit requests. Devices can choose to send data continuously or only on change.”h]”hÌ)”}”(hX.INPUT Report: Input reports provide data from device to host. This data may include button events, axis events, battery status or more. This data is generated by the device and sent to the host with or without requiring explicit requests. Devices can choose to send data continuously or only on change.”h]”hX.INPUT Report: Input reports provide data from device to host. This data may include button events, axis events, battery status or more. This data is generated by the device and sent to the host with or without requiring explicit requests. Devices can choose to send data continuously or only on change.”…””}”(hj>h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kuhj:ubah}”(h]”h ]”h"]”h$]”h&]”uh1j%hj7ubj&)”}”(hX;OUTPUT Report: Output reports change device states. They are sent from host to device and may include LED requests, rumble requests or more. Output reports are never sent from device to host, but a host can retrieve their current state. Hosts may choose to send output reports either continuously or only on change.”h]”hÌ)”}”(hX;OUTPUT Report: Output reports change device states. They are sent from host to device and may include LED requests, rumble requests or more. Output reports are never sent from device to host, but a host can retrieve their current state. Hosts may choose to send output reports either continuously or only on change.”h]”hX;OUTPUT Report: Output reports change device states. They are sent from host to device and may include LED requests, rumble requests or more. Output reports are never sent from device to host, but a host can retrieve their current state. Hosts may choose to send output reports either continuously or only on change.”…””}”(hjVh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KzhjRubah}”(h]”h ]”h"]”h$]”h&]”uh1j%hj7ubj&)”}”(hX–FEATURE Report: Feature reports are used for specific static device features and never reported spontaneously. A host can read and/or write them to access data like battery-state or device-settings. Feature reports are never sent without requests. A host must explicitly set or retrieve a feature report. This also means, feature reports are never sent on the intr channel as this channel is asynchronous. ”h]”hÌ)”}”(hX•FEATURE Report: Feature reports are used for specific static device features and never reported spontaneously. A host can read and/or write them to access data like battery-state or device-settings. Feature reports are never sent without requests. A host must explicitly set or retrieve a feature report. This also means, feature reports are never sent on the intr channel as this channel is asynchronous.”h]”hX•FEATURE Report: Feature reports are used for specific static device features and never reported spontaneously. A host can read and/or write them to access data like battery-state or device-settings. Feature reports are never sent without requests. A host must explicitly set or retrieve a feature report. This also means, feature reports are never sent on the intr channel as this channel is asynchronous.”…””}”(hjnh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K€hjjubah}”(h]”h ]”h"]”h$]”h&]”uh1j%hj7ubeh}”(h]”h ]”h"]”h$]”h&]”j\j]uh1j h³hÊh´Kuhj3ubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÊh´Kuhjµh²hubhÌ)”}”(hXgINPUT and OUTPUT reports can be sent as pure data reports on the intr channel. For INPUT reports this is the usual operational mode. But for OUTPUT reports, this is rarely done as OUTPUT reports are normally quite scarce. But devices are free to make excessive use of asynchronous OUTPUT reports (for instance, custom HID audio speakers make great use of it).”h]”hXgINPUT and OUTPUT reports can be sent as pure data reports on the intr channel. For INPUT reports this is the usual operational mode. But for OUTPUT reports, this is rarely done as OUTPUT reports are normally quite scarce. But devices are free to make excessive use of asynchronous OUTPUT reports (for instance, custom HID audio speakers make great use of it).”…””}”(hjŽh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K‡hjµh²hubhÌ)”}”(hŒÜPlain reports must not be sent on the ctrl channel, though. Instead, the ctrl channel provides synchronous GET/SET_REPORT requests. Plain reports are only allowed on the intr channel and are the only means of data there.”h]”hŒÜPlain reports must not be sent on the ctrl channel, though. Instead, the ctrl channel provides synchronous GET/SET_REPORT requests. Plain reports are only allowed on the intr channel and are the only means of data there.”…””}”(hjœh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khjµh²hubj)”}”(hX˜- GET_REPORT: A GET_REPORT request has a report ID as payload and is sent from host to device. The device must answer with a data report for the requested report ID on the ctrl channel as a synchronous acknowledgement. Only one GET_REPORT request can be pending for each device. This restriction is enforced by HID core as several transport drivers don't allow multiple simultaneous GET_REPORT requests. Note that data reports which are sent as answer to a GET_REPORT request are not handled as generic device events. That is, if a device does not operate in continuous data reporting mode, an answer to GET_REPORT does not replace the raw data report on the intr channel on state change. GET_REPORT is only used by custom HID device drivers to query device state. Normally, HID core caches any device state so this request is not necessary on devices that follow the HID specs except during device initialization to retrieve the current state. GET_REPORT requests can be sent for any of the 3 report types and shall return the current report state of the device. However, OUTPUT reports as payload may be blocked by the underlying transport driver if the specification does not allow them. - SET_REPORT: A SET_REPORT request has a report ID plus data as payload. It is sent from host to device and a device must update its current report state according to the given data. Any of the 3 report types can be used. However, INPUT reports as payload might be blocked by the underlying transport driver if the specification does not allow them. A device must answer with a synchronous acknowledgement. However, HID core does not require transport drivers to forward this acknowledgement to HID core. Same as for GET_REPORT, only one SET_REPORT can be pending at a time. This restriction is enforced by HID core as some transport drivers do not support multiple synchronous SET_REPORT requests. ”h]”j!)”}”(hhh]”(j&)”}”(hX¤GET_REPORT: A GET_REPORT request has a report ID as payload and is sent from host to device. The device must answer with a data report for the requested report ID on the ctrl channel as a synchronous acknowledgement. Only one GET_REPORT request can be pending for each device. This restriction is enforced by HID core as several transport drivers don't allow multiple simultaneous GET_REPORT requests. Note that data reports which are sent as answer to a GET_REPORT request are not handled as generic device events. That is, if a device does not operate in continuous data reporting mode, an answer to GET_REPORT does not replace the raw data report on the intr channel on state change. GET_REPORT is only used by custom HID device drivers to query device state. Normally, HID core caches any device state so this request is not necessary on devices that follow the HID specs except during device initialization to retrieve the current state. GET_REPORT requests can be sent for any of the 3 report types and shall return the current report state of the device. However, OUTPUT reports as payload may be blocked by the underlying transport driver if the specification does not allow them.”h]”hÌ)”}”(hX¤GET_REPORT: A GET_REPORT request has a report ID as payload and is sent from host to device. The device must answer with a data report for the requested report ID on the ctrl channel as a synchronous acknowledgement. Only one GET_REPORT request can be pending for each device. This restriction is enforced by HID core as several transport drivers don't allow multiple simultaneous GET_REPORT requests. Note that data reports which are sent as answer to a GET_REPORT request are not handled as generic device events. That is, if a device does not operate in continuous data reporting mode, an answer to GET_REPORT does not replace the raw data report on the intr channel on state change. GET_REPORT is only used by custom HID device drivers to query device state. Normally, HID core caches any device state so this request is not necessary on devices that follow the HID specs except during device initialization to retrieve the current state. GET_REPORT requests can be sent for any of the 3 report types and shall return the current report state of the device. However, OUTPUT reports as payload may be blocked by the underlying transport driver if the specification does not allow them.”h]”hX¦GET_REPORT: A GET_REPORT request has a report ID as payload and is sent from host to device. The device must answer with a data report for the requested report ID on the ctrl channel as a synchronous acknowledgement. Only one GET_REPORT request can be pending for each device. This restriction is enforced by HID core as several transport drivers don’t allow multiple simultaneous GET_REPORT requests. Note that data reports which are sent as answer to a GET_REPORT request are not handled as generic device events. That is, if a device does not operate in continuous data reporting mode, an answer to GET_REPORT does not replace the raw data report on the intr channel on state change. GET_REPORT is only used by custom HID device drivers to query device state. Normally, HID core caches any device state so this request is not necessary on devices that follow the HID specs except during device initialization to retrieve the current state. GET_REPORT requests can be sent for any of the 3 report types and shall return the current report state of the device. However, OUTPUT reports as payload may be blocked by the underlying transport driver if the specification does not allow them.”…””}”(hjµh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K‘hj±ubah}”(h]”h ]”h"]”h$]”h&]”uh1j%hj®ubj&)”}”(hX¹SET_REPORT: A SET_REPORT request has a report ID plus data as payload. It is sent from host to device and a device must update its current report state according to the given data. Any of the 3 report types can be used. However, INPUT reports as payload might be blocked by the underlying transport driver if the specification does not allow them. A device must answer with a synchronous acknowledgement. However, HID core does not require transport drivers to forward this acknowledgement to HID core. Same as for GET_REPORT, only one SET_REPORT can be pending at a time. This restriction is enforced by HID core as some transport drivers do not support multiple synchronous SET_REPORT requests. ”h]”hÌ)”}”(hX¸SET_REPORT: A SET_REPORT request has a report ID plus data as payload. It is sent from host to device and a device must update its current report state according to the given data. Any of the 3 report types can be used. However, INPUT reports as payload might be blocked by the underlying transport driver if the specification does not allow them. A device must answer with a synchronous acknowledgement. However, HID core does not require transport drivers to forward this acknowledgement to HID core. Same as for GET_REPORT, only one SET_REPORT can be pending at a time. This restriction is enforced by HID core as some transport drivers do not support multiple synchronous SET_REPORT requests.”h]”hX¸SET_REPORT: A SET_REPORT request has a report ID plus data as payload. It is sent from host to device and a device must update its current report state according to the given data. Any of the 3 report types can be used. However, INPUT reports as payload might be blocked by the underlying transport driver if the specification does not allow them. A device must answer with a synchronous acknowledgement. However, HID core does not require transport drivers to forward this acknowledgement to HID core. Same as for GET_REPORT, only one SET_REPORT can be pending at a time. This restriction is enforced by HID core as some transport drivers do not support multiple synchronous SET_REPORT requests.”…””}”(hjÍh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K£hjÉubah}”(h]”h ]”h"]”h$]”h&]”uh1j%hj®ubeh}”(h]”h ]”h"]”h$]”h&]”j\j]uh1j h³hÊh´K‘hjªubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÊh´K‘hjµh²hubhÌ)”}”(hŒˆOther ctrl-channel requests are supported by USB-HID but are not available (or deprecated) in most other transport level specifications:”h]”hŒˆOther ctrl-channel requests are supported by USB-HID but are not available (or deprecated) in most other transport level specifications:”…””}”(hjíh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K¯hjµh²hubj)”}”(hŒÊ- GET/SET_IDLE: Only used by USB-HID and I2C-HID. - GET/SET_PROTOCOL: Not used by HID core. - RESET: Used by I2C-HID, not hooked up in HID core. - SET_POWER: Used by I2C-HID, not hooked up in HID core. ”h]”j!)”}”(hhh]”(j&)”}”(hŒ/GET/SET_IDLE: Only used by USB-HID and I2C-HID.”h]”hÌ)”}”(hjh]”hŒ/GET/SET_IDLE: Only used by USB-HID and I2C-HID.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K²hjubah}”(h]”h ]”h"]”h$]”h&]”uh1j%hjÿubj&)”}”(hŒ'GET/SET_PROTOCOL: Not used by HID core.”h]”hÌ)”}”(hjh]”hŒ'GET/SET_PROTOCOL: Not used by HID core.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K³hjubah}”(h]”h ]”h"]”h$]”h&]”uh1j%hjÿubj&)”}”(hŒ2RESET: Used by I2C-HID, not hooked up in HID core.”h]”hÌ)”}”(hj2h]”hŒ2RESET: Used by I2C-HID, not hooked up in HID core.”…””}”(hj4h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K´hj0ubah}”(h]”h ]”h"]”h$]”h&]”uh1j%hjÿubj&)”}”(hŒ7SET_POWER: Used by I2C-HID, not hooked up in HID core. ”h]”hÌ)”}”(hŒ6SET_POWER: Used by I2C-HID, not hooked up in HID core.”h]”hŒ6SET_POWER: Used by I2C-HID, not hooked up in HID core.”…””}”(hjKh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KµhjGubah}”(h]”h ]”h"]”h$]”h&]”uh1j%hjÿubeh}”(h]”h ]”h"]”h$]”h&]”j\j]uh1j h³hÊh´K²hjûubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÊh´K²hjµh²hubeh}”(h]”Œtransport-driver-requirements”ah ]”h"]”Œ"1.2) transport driver requirements”ah$]”h&]”uh1hµhhÛh²hh³hÊh´KMubeh}”(h]”Œhid-bus”ah ]”h"]”Œ 1) hid bus”ah$]”h&]”uh1hµhh·h²hh³hÊh´K ubh¶)”}”(hhh]”(h»)”}”(hŒ 2) HID API”h]”hŒ 2) HID API”…””}”(hj~h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj{h²hh³hÊh´K¸ubh¶)”}”(hhh]”(h»)”}”(hŒ2.1) Initialization”h]”hŒ2.1) Initialization”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjŒh²hh³hÊh´K»ubhÌ)”}”(hŒ_Transport drivers normally use the following procedure to register a new device with HID core::”h]”hŒ^Transport drivers normally use the following procedure to register a new device with HID core:”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K½hjŒh²hubhû)”}”(hX“struct hid_device *hid; int ret; hid = hid_allocate_device(); if (IS_ERR(hid)) { ret = PTR_ERR(hid); goto err_<...>; } strscpy(hid->name, , sizeof(hid->name)); strscpy(hid->phys, , sizeof(hid->phys)); strscpy(hid->uniq, , sizeof(hid->uniq)); hid->ll_driver = &custom_ll_driver; hid->bus = ; hid->vendor = ; hid->product = ; hid->version = ; hid->country = ; hid->dev.parent = ; hid->driver_data = ; ret = hid_add_device(hid); if (ret) goto err_<...>;”h]”hX“struct hid_device *hid; int ret; hid = hid_allocate_device(); if (IS_ERR(hid)) { ret = PTR_ERR(hid); goto err_<...>; } strscpy(hid->name, , sizeof(hid->name)); strscpy(hid->phys, , sizeof(hid->phys)); strscpy(hid->uniq, , sizeof(hid->uniq)); hid->ll_driver = &custom_ll_driver; hid->bus = ; hid->vendor = ; hid->product = ; hid->version = ; hid->country = ; hid->dev.parent = ; hid->driver_data = ; ret = hid_add_device(hid); if (ret) goto err_<...>;”…””}”hj«sbah}”(h]”h ]”h"]”h$]”h&]”j j uh1húh³hÊh´KÀhjŒh²hubhÌ)”}”(hŒÃOnce hid_add_device() is entered, HID core might use the callbacks provided in "custom_ll_driver". Note that fields like "country" can be ignored by underlying transport-drivers if not supported.”h]”hŒËOnce hid_add_device() is entered, HID core might use the callbacks provided in “custom_ll_driverâ€. Note that fields like “country†can be ignored by underlying transport-drivers if not supported.”…””}”(hj¹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÚhjŒh²hubhÌ)”}”(hŒTo unregister a device, use::”h]”hŒTo unregister a device, use:”…””}”(hjÇh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÞhjŒh²hubhû)”}”(hŒhid_destroy_device(hid);”h]”hŒhid_destroy_device(hid);”…””}”hjÕsbah}”(h]”h ]”h"]”h$]”h&]”j j uh1húh³hÊh´KàhjŒh²hubhÌ)”}”(hŒ\Once hid_destroy_device() returns, HID core will no longer make use of any driver callbacks.”h]”hŒ\Once hid_destroy_device() returns, HID core will no longer make use of any driver callbacks.”…””}”(hjãh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KâhjŒh²hubeh}”(h]”Œinitialization”ah ]”h"]”Œ2.1) initialization”ah$]”h&]”uh1hµhj{h²hh³hÊh´K»ubh¶)”}”(hhh]”(h»)”}”(hŒ2.2) hid_ll_driver operations”h]”hŒ2.2) hid_ll_driver operations”…””}”(hjüh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjùh²hh³hÊh´KæubhÌ)”}”(hŒ The available HID callbacks are:”h]”hŒ The available HID callbacks are:”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kèhjùh²hubj)”}”(hXA:: int (*start) (struct hid_device *hdev) Called from HID device drivers once they want to use the device. Transport drivers can choose to setup their device in this callback. However, normally devices are already set up before transport drivers register them to HID core so this is mostly only used by USB-HID. :: void (*stop) (struct hid_device *hdev) Called from HID device drivers once they are done with a device. Transport drivers can free any buffers and deinitialize the device. But note that ->start() might be called again if another HID device driver is loaded on the device. Transport drivers are free to ignore it and deinitialize devices after they destroyed them via hid_destroy_device(). :: int (*open) (struct hid_device *hdev) Called from HID device drivers once they are interested in data reports. Usually, while user-space didn't open any input API/etc., device drivers are not interested in device data and transport drivers can put devices asleep. However, once ->open() is called, transport drivers must be ready for I/O. ->open() calls are nested for each client that opens the HID device. :: void (*close) (struct hid_device *hdev) Called from HID device drivers after ->open() was called but they are no longer interested in device reports. (Usually if user-space closed any input devices of the driver). Transport drivers can put devices asleep and terminate any I/O of all ->open() calls have been followed by a ->close() call. However, ->start() may be called again if the device driver is interested in input reports again. :: int (*parse) (struct hid_device *hdev) Called once during device setup after ->start() has been called. Transport drivers must read the HID report-descriptor from the device and tell HID core about it via hid_parse_report(). :: int (*power) (struct hid_device *hdev, int level) Called by HID core to give PM hints to transport drivers. Usually this is analogical to the ->open() and ->close() hints and redundant. :: void (*request) (struct hid_device *hdev, struct hid_report *report, int reqtype) Send a HID request on the ctrl channel. "report" contains the report that should be sent and "reqtype" the request type. Request-type can be HID_REQ_SET_REPORT or HID_REQ_GET_REPORT. This callback is optional. If not provided, HID core will assemble a raw report following the HID specs and send it via the ->raw_request() callback. The transport driver is free to implement this asynchronously. :: int (*wait) (struct hid_device *hdev) Used by HID core before calling ->request() again. A transport driver can use it to wait for any pending requests to complete if only one request is allowed at a time. :: int (*raw_request) (struct hid_device *hdev, unsigned char reportnum, __u8 *buf, size_t count, unsigned char rtype, int reqtype) Same as ->request() but provides the report as raw buffer. This request shall be synchronous. A transport driver must not use ->wait() to complete such requests. This request is mandatory and hid core will reject the device if it is missing. :: int (*output_report) (struct hid_device *hdev, __u8 *buf, size_t len) Send raw output report via intr channel. Used by some HID device drivers which require high throughput for outgoing requests on the intr channel. This must not cause SET_REPORT calls! This must be implemented as asynchronous output report on the intr channel! :: int (*idle) (struct hid_device *hdev, int report, int idle, int reqtype) Perform SET/GET_IDLE request. Only used by USB-HID, do not implement! ”h]”(hû)”}”(hŒ&int (*start) (struct hid_device *hdev)”h]”hŒ&int (*start) (struct hid_device *hdev)”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”j j uh1húh³hÊh´KìhjubhÌ)”}”(hX Called from HID device drivers once they want to use the device. Transport drivers can choose to setup their device in this callback. However, normally devices are already set up before transport drivers register them to HID core so this is mostly only used by USB-HID.”h]”hX Called from HID device drivers once they want to use the device. Transport drivers can choose to setup their device in this callback. However, normally devices are already set up before transport drivers register them to HID core so this is mostly only used by USB-HID.”…””}”(hj*h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kîhjubhû)”}”(hŒ&void (*stop) (struct hid_device *hdev)”h]”hŒ&void (*stop) (struct hid_device *hdev)”…””}”hj8sbah}”(h]”h ]”h"]”h$]”h&]”j j uh1húh³hÊh´KõhjubhÌ)”}”(hŒèCalled from HID device drivers once they are done with a device. Transport drivers can free any buffers and deinitialize the device. But note that ->start() might be called again if another HID device driver is loaded on the device.”h]”hŒèCalled from HID device drivers once they are done with a device. Transport drivers can free any buffers and deinitialize the device. But note that ->start() might be called again if another HID device driver is loaded on the device.”…””}”(hjFh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K÷hjubhÌ)”}”(hŒtTransport drivers are free to ignore it and deinitialize devices after they destroyed them via hid_destroy_device().”h]”hŒtTransport drivers are free to ignore it and deinitialize devices after they destroyed them via hid_destroy_device().”…””}”(hjTh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kühjubhû)”}”(hŒ%int (*open) (struct hid_device *hdev)”h]”hŒ%int (*open) (struct hid_device *hdev)”…””}”hjbsbah}”(h]”h ]”h"]”h$]”h&]”j j uh1húh³hÊh´MhjubhÌ)”}”(hXqCalled from HID device drivers once they are interested in data reports. Usually, while user-space didn't open any input API/etc., device drivers are not interested in device data and transport drivers can put devices asleep. However, once ->open() is called, transport drivers must be ready for I/O. ->open() calls are nested for each client that opens the HID device.”h]”hXsCalled from HID device drivers once they are interested in data reports. Usually, while user-space didn’t open any input API/etc., device drivers are not interested in device data and transport drivers can put devices asleep. However, once ->open() is called, transport drivers must be ready for I/O. ->open() calls are nested for each client that opens the HID device.”…””}”(hjph²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhjubhû)”}”(hŒ'void (*close) (struct hid_device *hdev)”h]”hŒ'void (*close) (struct hid_device *hdev)”…””}”hj~sbah}”(h]”h ]”h"]”h$]”h&]”j j uh1húh³hÊh´M hjubhÌ)”}”(hŒ­Called from HID device drivers after ->open() was called but they are no longer interested in device reports. (Usually if user-space closed any input devices of the driver).”h]”hŒ­Called from HID device drivers after ->open() was called but they are no longer interested in device reports. (Usually if user-space closed any input devices of the driver).”…””}”(hjŒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M hjubhÌ)”}”(hŒÞTransport drivers can put devices asleep and terminate any I/O of all ->open() calls have been followed by a ->close() call. However, ->start() may be called again if the device driver is interested in input reports again.”h]”hŒÞTransport drivers can put devices asleep and terminate any I/O of all ->open() calls have been followed by a ->close() call. However, ->start() may be called again if the device driver is interested in input reports again.”…””}”(hjšh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhjubhû)”}”(hŒ&int (*parse) (struct hid_device *hdev)”h]”hŒ&int (*parse) (struct hid_device *hdev)”…””}”hj¨sbah}”(h]”h ]”h"]”h$]”h&]”j j uh1húh³hÊh´MhjubhÌ)”}”(hŒ¹Called once during device setup after ->start() has been called. Transport drivers must read the HID report-descriptor from the device and tell HID core about it via hid_parse_report().”h]”hŒ¹Called once during device setup after ->start() has been called. Transport drivers must read the HID report-descriptor from the device and tell HID core about it via hid_parse_report().”…””}”(hj¶h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhjubhû)”}”(hŒ1int (*power) (struct hid_device *hdev, int level)”h]”hŒ1int (*power) (struct hid_device *hdev, int level)”…””}”hjÄsbah}”(h]”h ]”h"]”h$]”h&]”j j uh1húh³hÊh´MhjubhÌ)”}”(hŒ‡Called by HID core to give PM hints to transport drivers. Usually this is analogical to the ->open() and ->close() hints and redundant.”h]”hŒ‡Called by HID core to give PM hints to transport drivers. Usually this is analogical to the ->open() and ->close() hints and redundant.”…””}”(hjÒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M!hjubhû)”}”(hŒbvoid (*request) (struct hid_device *hdev, struct hid_report *report, int reqtype)”h]”hŒbvoid (*request) (struct hid_device *hdev, struct hid_report *report, int reqtype)”…””}”hjàsbah}”(h]”h ]”h"]”h$]”h&]”j j uh1húh³hÊh´M&hjubhÌ)”}”(hŒ¶Send a HID request on the ctrl channel. "report" contains the report that should be sent and "reqtype" the request type. Request-type can be HID_REQ_SET_REPORT or HID_REQ_GET_REPORT.”h]”hŒ¾Send a HID request on the ctrl channel. “report†contains the report that should be sent and “reqtype†the request type. Request-type can be HID_REQ_SET_REPORT or HID_REQ_GET_REPORT.”…””}”(hjîh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M)hjubhÌ)”}”(hŒÔThis callback is optional. If not provided, HID core will assemble a raw report following the HID specs and send it via the ->raw_request() callback. The transport driver is free to implement this asynchronously.”h]”hŒÔThis callback is optional. If not provided, HID core will assemble a raw report following the HID specs and send it via the ->raw_request() callback. The transport driver is free to implement this asynchronously.”…””}”(hjüh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M-hjubhû)”}”(hŒ%int (*wait) (struct hid_device *hdev)”h]”hŒ%int (*wait) (struct hid_device *hdev)”…””}”hj sbah}”(h]”h ]”h"]”h$]”h&]”j j uh1húh³hÊh´M3hjubhÌ)”}”(hŒ§Used by HID core before calling ->request() again. A transport driver can use it to wait for any pending requests to complete if only one request is allowed at a time.”h]”hŒ§Used by HID core before calling ->request() again. A transport driver can use it to wait for any pending requests to complete if only one request is allowed at a time.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M5hjubhû)”}”(hŒ¨int (*raw_request) (struct hid_device *hdev, unsigned char reportnum, __u8 *buf, size_t count, unsigned char rtype, int reqtype)”h]”hŒ¨int (*raw_request) (struct hid_device *hdev, unsigned char reportnum, __u8 *buf, size_t count, unsigned char rtype, int reqtype)”…””}”hj&sbah}”(h]”h ]”h"]”h$]”h&]”j j uh1húh³hÊh´M;hjubhÌ)”}”(hŒñSame as ->request() but provides the report as raw buffer. This request shall be synchronous. A transport driver must not use ->wait() to complete such requests. This request is mandatory and hid core will reject the device if it is missing.”h]”hŒñSame as ->request() but provides the report as raw buffer. This request shall be synchronous. A transport driver must not use ->wait() to complete such requests. This request is mandatory and hid core will reject the device if it is missing.”…””}”(hj4h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M?hjubhû)”}”(hŒEint (*output_report) (struct hid_device *hdev, __u8 *buf, size_t len)”h]”hŒEint (*output_report) (struct hid_device *hdev, __u8 *buf, size_t len)”…””}”hjBsbah}”(h]”h ]”h"]”h$]”h&]”j j uh1húh³hÊh´MFhjubhÌ)”}”(hXSend raw output report via intr channel. Used by some HID device drivers which require high throughput for outgoing requests on the intr channel. This must not cause SET_REPORT calls! This must be implemented as asynchronous output report on the intr channel!”h]”hXSend raw output report via intr channel. Used by some HID device drivers which require high throughput for outgoing requests on the intr channel. This must not cause SET_REPORT calls! This must be implemented as asynchronous output report on the intr channel!”…””}”(hjPh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MHhjubhû)”}”(hŒHint (*idle) (struct hid_device *hdev, int report, int idle, int reqtype)”h]”hŒHint (*idle) (struct hid_device *hdev, int report, int idle, int reqtype)”…””}”hj^sbah}”(h]”h ]”h"]”h$]”h&]”j j uh1húh³hÊh´MOhjubhÌ)”}”(hŒEPerform SET/GET_IDLE request. Only used by USB-HID, do not implement!”h]”hŒEPerform SET/GET_IDLE request. Only used by USB-HID, do not implement!”…””}”(hjlh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MQhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÊh´Kêhjùh²hubeh}”(h]”Œhid-ll-driver-operations”ah ]”h"]”Œ2.2) hid_ll_driver operations”ah$]”h&]”uh1hµhj{h²hh³hÊh´Kæubh¶)”}”(hhh]”(h»)”}”(hŒ2.3) Data Path”h]”hŒ2.3) Data Path”…””}”(hj‹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjˆh²hh³hÊh´MTubhÌ)”}”(hX Transport drivers are responsible of reading data from I/O devices. They must handle any I/O-related state-tracking themselves. HID core does not implement protocol handshakes or other management commands which can be required by the given HID transport specification.”h]”hX Transport drivers are responsible of reading data from I/O devices. They must handle any I/O-related state-tracking themselves. HID core does not implement protocol handshakes or other management commands which can be required by the given HID transport specification.”…””}”(hj™h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MVhjˆh²hubhÌ)”}”(hŒúEvery raw data packet read from a device must be fed into HID core via hid_input_report(). You must specify the channel-type (intr or ctrl) and report type (input/output/feature). Under normal conditions, only input reports are provided via this API.”h]”hŒúEvery raw data packet read from a device must be fed into HID core via hid_input_report(). You must specify the channel-type (intr or ctrl) and report type (input/output/feature). Under normal conditions, only input reports are provided via this API.”…””}”(hj§h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M[hjˆh²hubhÌ)”}”(hX Responses to GET_REPORT requests via ->request() must also be provided via this API. Responses to ->raw_request() are synchronous and must be intercepted by the transport driver and not passed to hid_input_report(). Acknowledgements to SET_REPORT requests are not of interest to HID core.”h]”hX Responses to GET_REPORT requests via ->request() must also be provided via this API. Responses to ->raw_request() are synchronous and must be intercepted by the transport driver and not passed to hid_input_report(). Acknowledgements to SET_REPORT requests are not of interest to HID core.”…””}”(hjµh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M`hjˆh²hubhŒ transition”“”)”}”(hŒ4----------------------------------------------------”h]”h}”(h]”h ]”h"]”h$]”h&]”uh1jÃh³hÊh´Mehjˆh²hubhÌ)”}”(hŒ4Written 2013, David Herrmann ”h]”(hŒWritten 2013, David Herrmann <”…””}”(hjÏh²hh³Nh´NubhŒ reference”“”)”}”(hŒdh.herrmann@gmail.com”h]”hŒdh.herrmann@gmail.com”…””}”(hjÙh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œmailto:dh.herrmann@gmail.com”uh1j×hjÏubhŒ>”…””}”(hjÏh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mghjˆh²hubeh}”(h]”Œ data-path”ah ]”h"]”Œ2.3) data path”ah$]”h&]”uh1hµhj{h²hh³hÊh´MTubeh}”(h]”Œhid-api”ah ]”h"]”Œ 2) hid api”ah$]”h&]”uh1hµhh·h²hh³hÊh´K¸ubeh}”(h]”Œhid-i-o-transport-drivers”ah ]”h"]”Œhid i/o transport drivers”ah$]”h&]”uh1hµhhh²hh³hÊh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÊuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(hºNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”j.Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÊŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jjjxjuj²j¯jpjmjjýjöjój…j‚jøjõuŒ nametypes”}”(j‰jx‰j²‰jp‰j‰jö‰j…‰jø‰uh}”(jh·juhÛj¯jrjmjµjýj{jójŒj‚jùjõjˆuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.