Page MenuHomeFreeBSD

hid: Import functions and constants required by new subsystem
ClosedPublic

Authored by wulf on Jan 2 2021, 11:12 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 24, 7:02 PM
Unknown Object (File)
Oct 4 2024, 10:04 AM
Unknown Object (File)
Oct 4 2024, 5:10 AM
Unknown Object (File)
Sep 30 2024, 5:16 PM
Unknown Object (File)
Sep 28 2024, 9:01 AM
Unknown Object (File)
Sep 27 2024, 5:48 PM
Unknown Object (File)
Sep 26 2024, 8:15 AM
Unknown Object (File)
Sep 25 2024, 10:41 AM

Details

Summary

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

Besides that, this change renames some function to get a better match 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 tp hid_get_udata()
  • hid_put_data_unsigned() renamed to hid_put_udata()

Compatibility shims hidden under COMPAT_USBHID12 #define are provided in usbhid.h to make possible compiling of old code unmodified after this change.

The revision is subset of https://reviews.freebsd.org/D27777

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

wulf requested review of this revision.Jan 2 2021, 11:12 AM
This revision is now accepted and ready to land.Jan 2 2021, 12:50 PM
sys/amd64/conf/GENERIC
385

Is the intent that we'll leave these enabled indefinitely, or only during initial work?

sys/amd64/conf/GENERIC
385

It's like USB_DEBUG so it will be present in GENERIC but can be turned off via nooptions.