]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
hid: Import functions and constants required by new subsystem
authorVladimir Kondratyev <wulf@FreeBSD.org>
Mon, 5 Oct 2020 09:38:11 +0000 (12:38 +0300)
committerVladimir Kondratyev <wulf@FreeBSD.org>
Thu, 7 Jan 2021 23:18:42 +0000 (02:18 +0300)
commit197587867321ebde6c32228eac85c98ad19da95d
tree4abe0fb0ff745fe7fea3083cdd8c6972712c1539
parent67de2db2623a10dc4edec1642b2f8685d5587d7f
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
19 files changed:
sys/amd64/conf/GENERIC
sys/arm64/conf/GENERIC
sys/arm64/conf/GENERIC-NODEBUG
sys/conf/options
sys/dev/hid/hid.c
sys/dev/hid/hid.h
sys/dev/hid/hidquirk.h [new file with mode: 0644]
sys/dev/usb/usbhid.h
sys/i386/conf/GENERIC
sys/mips/conf/ERL
sys/mips/conf/JZ4780
sys/mips/conf/OCTEON1
sys/modules/hid/hid/Makefile
sys/powerpc/conf/GENERIC
sys/powerpc/conf/GENERIC64
sys/powerpc/conf/GENERIC64LE
sys/powerpc/conf/MPC85XX
sys/powerpc/conf/MPC85XXSPE
sys/powerpc/conf/QORIQ64