diff options
author | Cristian Ciocaltea <cristian.ciocaltea@collabora.com> | 2023-09-15 19:15:50 +0300 |
---|---|---|
committer | Cristian Ciocaltea <cristian.ciocaltea@collabora.com> | 2023-09-15 19:15:50 +0300 |
commit | 0264f4154c6a970241f1ae13ccfdc174cc0812ac (patch) | |
tree | c70c0fd2f10cdf093ad8dc3499e3427901b9667c /include | |
parent | 31ceb6e263c07d60f73fa982e3d16d142fa1a70d (diff) | |
parent | 024256b114215ebca2e233b0e5d36f94f608214f (diff) | |
download | linux-0264f4154c6a970241f1ae13ccfdc174cc0812ac.tar.gz |
Merge branch 6.1/features/hid
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/uapi/linux/usb/g_hid.h | 22 | ||||
-rw-r--r-- | include/uapi/linux/usb/gadgetfs.h | 2 |
2 files changed, 23 insertions, 1 deletions
diff --git a/include/uapi/linux/usb/g_hid.h b/include/uapi/linux/usb/g_hid.h new file mode 100644 index 000000000000..54814c2c68d6 --- /dev/null +++ b/include/uapi/linux/usb/g_hid.h @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ + +#ifndef __UAPI_LINUX_USB_G_HID_H +#define __UAPI_LINUX_USB_G_HID_H + +#include <linux/types.h> + +#define HIDG_REPORT_SIZE_MAX 64 + +struct usb_hidg_report { + __u16 length; + __u8 data[HIDG_REPORT_SIZE_MAX]; +}; + +/* The 'g' code is also used by gadgetfs and hid gadget ioctl requests. + * Don't add any colliding codes to either driver, and keep + * them in unique ranges (size 0x20 for now). + */ +#define GADGET_HID_READ_SET_REPORT _IOR('g', 0x41, struct usb_hidg_report) +#define GADGET_HID_WRITE_GET_REPORT _IOW('g', 0x42, struct usb_hidg_report) + +#endif /* __UAPI_LINUX_USB_G_HID_H */ diff --git a/include/uapi/linux/usb/gadgetfs.h b/include/uapi/linux/usb/gadgetfs.h index 835473910a49..9754822b2a40 100644 --- a/include/uapi/linux/usb/gadgetfs.h +++ b/include/uapi/linux/usb/gadgetfs.h @@ -62,7 +62,7 @@ struct usb_gadgetfs_event { }; -/* The 'g' code is also used by printer gadget ioctl requests. +/* The 'g' code is also used by printer and hid gadget ioctl requests. * Don't add any colliding codes to either driver, and keep * them in unique ranges (size 0x20 for now). */ |