HomeFreeBSD

hid: Import functions and constants required by new subsystem

Description

hid: Import functions and constants required by new subsystem

This does an import of quirk stubs, debugging macros from USB code and
numerous usage constants used by dependent drivers.

Besides, this change renames some functions to get a better matching
with userland library and NetBSD/OpenBSD HID code. Namely:

  • Old hid_report_size() renamed to hid_report_size_max()
  • New hid_report_size() calculates size of given report rather than maximum size of all reports.
  • hid_get_data_unsigned() renamed to hid_get_udata()
  • hid_put_data_unsigned() renamed to hid_put_udata()

Compat shim functions are provided in usbhid.h to make possible compile
of legacy code unmodified after this change.

Reviewed by: manu, hselasky
Differential revision: https://reviews.freebsd.org/D27887

Details

Provenance
wulfAuthored on Oct 5 2020, 9:38 AM
Reviewer
manu
Differential Revision
D27887: hid: Import functions and constants required by new subsystem
Parents
rG67de2db2623a: Factor-out hardware-independent part of USB HID support to new module
Branches
Unknown
Tags
Unknown