diff options
author | Li Jun <jun.li@freescale.com> | 2015-07-09 10:18:47 +0300 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-07-29 17:59:21 +0300 |
commit | d1606dfb98e59221332704c05f5908d9116456ab (patch) | |
tree | 81dde09c5fbaca2bcadf7acfec29205787ec185a /include/linux/usb | |
parent | b0930d4cafb487a663ac6780a0369d1a0f461bc2 (diff) | |
download | linux-d1606dfb98e59221332704c05f5908d9116456ab.tar.xz |
usb: gadget: add usb 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.
Signed-off-by: Li Jun <jun.li@freescale.com>
Reviewed-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'include/linux/usb')
-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 fffceafb6b8c..cea0511a1bc9 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h @@ -1092,6 +1092,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 */ |