diff options
author | Li Jun <jun.li@freescale.com> | 2015-06-06 11:18:36 +0800 |
---|---|---|
committer | Li Jun <jun.li@freescale.com> | 2015-07-07 11:18:31 +0800 |
commit | 0587b916c2e8b6ad09e35568cf8503c99f4e1ced (patch) | |
tree | c94af3f1045f7c1fb2573dddca66cc3066f831d7 /include/linux | |
parent | 502ffedb66e4d1cb0a4676b209e9b19b746de7c3 (diff) |
MLK-11123-10 usb: gadget: add otg descriptor allocate and init interface
Allocate usb otg descriptor and initialize it according to gadget's otg
capabilities, if usb_otg_caps is not set, keep settings as current gadget
drivers. With this 2 new interfaces, gadget can use usb_otg_descriptor
for OTG 1.x, and usb_otg20_descriptor for OTG 2.0 or above, and otg
features can be decided by the combination of usb hardware property
and driver config.
Reviewed-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Li Jun <jun.li@freescale.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/usb/gadget.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index fb7a2a7ce7dc..ebb199467b00 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h @@ -999,6 +999,10 @@ int usb_assign_descriptors(struct usb_function *f, struct usb_descriptor_header **ss); void usb_free_all_descriptors(struct usb_function *f); +struct usb_descriptor_header *usb_otg_descriptor_alloc( + struct usb_gadget *gadget); +int usb_otg_descriptor_init(struct usb_gadget *gadget, + struct usb_descriptor_header *otg_desc); /*-------------------------------------------------------------------------*/ /* utility to simplify map/unmap of usb_requests to/from DMA */ |