opnsense-src/sys/dev/usb
Vladimir Kondratyev 7545c8c116 hidraw(4): Add additional hidraw input/output report ioctls
to Linux hidraw compatibility API.

Respective Linux commit f43d3870cafa made by Dean Camera message is:

Currently the hidraw module can only read and write feature HID reports on
demand, via dedicated ioctls. Input reports are read from the device through
the read() interface, while output reports are written through the write
interface().

This is insufficient; it is desirable in many situations to be able to read and
write input and output reports through the control interface to cover
additional scenarios:

  - Reading an input report by its report ID, to get initial state
  - Writing an input report, to set initial input state in the device
  - Reading an output report by its report ID, to obtain current state
  - Writing an output report by its report ID, out of band

This patch adds these missing ioctl requests to read and write the remaining
HID report types. Note that not all HID backends will neccesarily support this
(e.g. while the USB link layer supports setting Input reports, others may not).

FreeBSD native uhid(4) compatible API already has similar ioctls.

MFC after:	3 days

(cherry picked from commit fd6690e2d5cd5b15fce2c74ab0cac77a83514f6a)
2025-04-30 10:32:22 +03:00
..
controller usb: Kill left-over cdefs.h includes 2025-03-11 09:41:19 -06:00
gadget
input usb: Kill left-over cdefs.h includes 2025-03-11 09:41:19 -06:00
misc usb: Kill left-over cdefs.h includes 2025-03-11 09:41:19 -06:00
net usb: Kill left-over cdefs.h includes 2025-03-11 09:41:19 -06:00
quirk
serial usb: Kill left-over cdefs.h includes 2025-03-11 09:41:19 -06:00
storage usb: Kill left-over cdefs.h includes 2025-03-11 09:41:19 -06:00
template usb: Kill left-over cdefs.h includes 2025-03-11 09:41:19 -06:00
video
wlan usb: Kill left-over cdefs.h includes 2025-03-11 09:41:19 -06:00
ufm_ioctl.h
uftdiio.h
uled_ioctl.h
usb.h usb: increase USB_PORT_RESET_RECOVERY 2025-03-25 19:28:38 -06:00
usb_bus.h
usb_busdma.c
usb_busdma.h
usb_cdc.h
usb_controller.h
usb_core.c
usb_core.h
usb_debug.c
usb_debug.h
usb_dev.c kern: Make fileops and filterops tables const where possible 2024-12-03 01:03:42 +00:00
usb_dev.h
usb_device.c
usb_device.h
usb_dynamic.c
usb_dynamic.h
usb_endian.h
usb_error.c
usb_fdt_support.c
usb_fdt_support.h
usb_freebsd.h
usb_freebsd_loader.h
usb_generic.c
usb_generic.h
usb_handle_request.c
usb_hid.c
usb_hub.c
usb_hub.h
usb_hub_acpi.c
usb_hub_private.h
usb_if.m
usb_ioctl.h hidraw(4): Add additional hidraw input/output report ioctls 2025-04-30 10:32:22 +03:00
usb_lookup.c
usb_mbuf.c
usb_mbuf.h
usb_msctest.c usb-msctest: Be more conservative setting GETMAXLUN quirk 2025-03-24 21:01:56 -06:00
usb_msctest.h
usb_parse.c
usb_pci.h
usb_pf.c
usb_pf.h
usb_process.c usb: serial: allow the open/close sleep to be interruptible 2024-12-31 23:45:24 -06:00
usb_process.h usb: serial: allow the open/close sleep to be interruptible 2024-12-31 23:45:24 -06:00
usb_request.c
usb_request.h
usb_transfer.c
usb_transfer.h
usb_util.c
usb_util.h
usbdevs ure(4): Add support for ELECOM EDC-QUA3C 2025-02-07 14:46:53 +00:00
usbdi.h usb: serial: allow the open/close sleep to be interruptible 2024-12-31 23:45:24 -06:00
usbdi_util.h
usbhid.h