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-22 10:22:10 +0800 |
commit | af2189c93737b71370079b6bd47fdcb0b442889a (patch) | |
tree | f2b318eb672034808988773459916cc20c1dfc80 /include | |
parent | 79df233ab62b9854e0f1c1c5910b0f84b16c9e1c (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>
(cherry picked from commit 0587b916c2e8b6ad09e35568cf8503c99f4e1ced)
Diffstat (limited to 'include')
-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 */ |