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)
Fri, Dec 20, 8:40 AM
Unknown Object (File)
Mon, Dec 16, 5:32 PM
Unknown Object (File)
Sun, Dec 8, 6:13 PM
Unknown Object (File)
Nov 8 2024, 9:04 PM
Unknown Object (File)
Oct 24 2024, 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

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.