usb: gadget: f_hid: {GET,SET} PROTOCOL Support

The current f_hid driver doesn't handle GET_PROCOTOL and
SET_PROCOTOL requests, which are required to operate HID
gadgets in BOOT mode. This patch implements this feature for
devices that have the same implementation for REPORT and BOOT mode
so that these devices are recognized by older BIOSes.

Signed-off-by: Abdulhadi Mohamed <abdulahhadi2@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
This commit is contained in:
Abdulhadi Mohamed 2017-07-19 16:31:10 +01:00 committed by Felipe Balbi
parent 4a10a937ed
commit b3c4ec71ec
2 changed files with 22 additions and 1 deletions

View file

@ -362,6 +362,12 @@ struct hid_item {
#define HID_GROUP_WACOM 0x0101
#define HID_GROUP_LOGITECH_DJ_DEVICE 0x0102
/*
* HID protocol status
*/
#define HID_REPORT_PROTOCOL 1
#define HID_BOOT_PROTOCOL 0
/*
* This is the global environment of the parser. This information is
* persistent for main-items. The global environment can be saved and