mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
usb: gadget: ffs: add HID descriptor support.
When writing the descriptors to the ep0 file of functionfs, the HID descriptors where not recognized which caused the initialization from user space to fail. Signed-off-by: Koen Beel <koen.beel@barco.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Change-Id: Id0f930e12a84315995a3ea4d08757ba1f3b567be
This commit is contained in:
parent
14d2675562
commit
ae4d705dcf
1 changed files with 7 additions and 0 deletions
|
@ -21,6 +21,7 @@
|
|||
#include <linux/blkdev.h>
|
||||
#include <linux/pagemap.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/hid.h>
|
||||
#include <asm/unaligned.h>
|
||||
|
||||
#include <linux/usb/composite.h>
|
||||
|
@ -1656,6 +1657,12 @@ static int __must_check ffs_do_desc(char *data, unsigned len,
|
|||
}
|
||||
break;
|
||||
|
||||
case HID_DT_HID:
|
||||
pr_vdebug("hid descriptor\n");
|
||||
if (length != sizeof(struct hid_descriptor))
|
||||
goto inv_length;
|
||||
break;
|
||||
|
||||
case USB_DT_OTG:
|
||||
if (length != sizeof(struct usb_otg_descriptor))
|
||||
goto inv_length;
|
||||
|
|
Loading…
Reference in a new issue