summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLi Jun <jun.li@freescale.com>2015-06-06 11:18:36 +0800
committerNitin Garg <nitin.garg@freescale.com>2015-09-17 09:23:52 -0500
commitfd08b44fab5d58ae177765e02aaba5bd60bbe7c9 (patch)
tree734651a2a1d2a5f8fef4cd42f0460a942f0c862a /include
parentfdc1f5ca644afa3a7cb7e75b0c80ca84de74063a (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')
-rw-r--r--include/linux/usb/gadget.h4
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 */