Allow HID report descriptor parser to return more then 1 usage per item with changing usage field type of struct hid_item to array
This handles parsing of following report descriptor, containing array of usages:
0x05, 0x01, // Usage Page (Generic Desktop Ctrls) 0x09, 0x80, // Usage (Sys Control) 0xA1, 0x01, // Collection (Application) 0x75, 0x02, // Report Size (2) 0x95, 0x01, // Report Count (1) 0x15, 0x01, // Logical Minimum (1) 0x25, 0x03, // Logical Maximum (3) 0x09, 0x82, // Usage (Sys Sleep) 0x09, 0x81, // Usage (Sys Power Down) 0x09, 0x83, // Usage (Sys Wake Up) 0x81, 0x60, // Input (Data,Array,Abs) 0x75, 0x06, // Report Size (6) 0x81, 0x03, // Input (Const,Var,Abs) 0xC0, // End Collection
Our current parser returns only first usage (Sys Sleep) and loses next two.
Set HI_MAXUSAGE limit relatively low as existing code usually allocates
hid_item on stack and aforementioned report descripror snippet is only
sample I have seen.