aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/hid/hid.h
Commit message (Collapse)AuthorAgeFilesLines
* hid: Add extra constant to units of measurementVladimir Kondratyev2021-08-161-0/+1
| | | | | | | | Some devices like eGalax touchscreens use value of 0x33 instead of 0x13 for inches as unit of measure. Reported by: Mark Kane <mark_AT_kane_DOT_mn> MFC after: 1 week
* hid: bump HID_ITEM_MAXUSAGES to 8Warner Losh2021-02-081-1/+1
| | | | | | | | | | | My YOGA requires a minimum of 7 to parse w/o an error. Since the memory savings are trivial and the yoga a popular system, bump the default up to 8. There's no API/ABI issues in doing this. This hid_item struct isn't exported to userland and the one libusbhid has is different and only shares a name... MFC After: 3 days Reviewed by: wulf@ Differential Revision: https://reviews.freebsd.org/D28543
* hidraw(4): Add HIDRAW_MAKE_UHID_ALIAS kernel optionVladimir Kondratyev2021-01-071-0/+3
| | | | | | | | | | which installs /dev/uhid# alias to hidraw character device for compatibility with some existing uhid(4) users like Firefox. As side effect it renames traditional uhid(4) driver to hidraw to make possible using of common unit number allocator. Requested by: Greg V <greg_unrelenting.technology> Reviewed by: hselasky (as part of D27992)
* hid: Import HID transport method definitions and helper functions.Vladimir Kondratyev2021-01-071-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Create an abstract HID interface that provides hardware independent access to HID capabilities and functions through the device tree. hid_if.m resembles existing USBHID KPI and consist of next methods: HID method USBHID variant ----------------------------------------------------------------------- hid_intr_setup usbd_transfer_setup (INTERRUPT IN xfer) hid_intr_unsetup usbd_transfer_unsetup (INTERRUPT IN xfer) hid_intr_start usbd_transfer_start (INTERRUPT IN xfer) hid_intr_stop usbd_transfer_drain (INTERRUPT IN xfer) hid_intr_poll usbd_transfer_poll (INTERRUPT IN xfer) hid_get_rdesc usbd_req_get_report_descriptor hid_read No direct analog. Not intended for common use. hid_write uhid(4) write() hid_get_report usbd_req_get_report hid_set_report usbd_req_set_report hid_set_idle usbd_req_set_idle hid_set_protocol usbd_req_set_protocol This change is part of D27888
* hid: Import functions and constants required by new subsystemVladimir Kondratyev2021-01-071-11/+99
| | | | | | | | | | | | | | | | | | | | 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
* Factor-out hardware-independent part of USB HID support to new moduleVladimir Kondratyev2021-01-071-40/+3
| | | | | | | | It will be used by the upcoming HID-over-i2C implementation. Should be no-op, except hid.ko module dependency is to be added to affected drivers. Reviewed by: hselasky, manu Differential revision: https://reviews.freebsd.org/D27867
* Copy HID over USB support files to new sys/dev/hid directoryVladimir Kondratyev2021-01-071-0/+284