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)
Wed, Apr 10, 7:05 AM
Unknown Object (File)
Mar 7 2024, 5:47 PM
Unknown Object (File)
Dec 23 2023, 12:58 AM
Unknown Object (File)
Dec 11 2023, 1:48 AM
Unknown Object (File)
Sep 13 2023, 9:18 PM
Unknown Object (File)
Sep 6 2023, 2:04 AM
Unknown Object (File)
Sep 1 2023, 12:37 AM
Unknown Object (File)
Sep 1 2023, 12:34 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 Skipped
Unit
Tests Skipped

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.