usb: add usb_otg_caps to usb_gadget structure.
authorMacpaul Lin <macpaul@gmail.com>
Thu, 9 Jul 2015 07:18:41 +0000 (15:18 +0800)
committerFelipe Balbi <balbi@ti.com>
Wed, 29 Jul 2015 14:59:20 +0000 (09:59 -0500)
Add usb_otg_caps pointer to usb_gadget structure to indicate its
otg capabilities.

Signed-off-by: Macpaul Lin <macpaul@gmail.com>
Signed-off-by: Li Jun <jun.li@freescale.com>
Reviewed-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
include/linux/usb/gadget.h

index 15604bb..fffceaf 100644 (file)
@@ -511,6 +511,7 @@ struct usb_gadget_ops {
  * @dev: Driver model state for this abstract device.
  * @out_epnum: last used out ep number
  * @in_epnum: last used in ep number
+ * @otg_caps: OTG capabilities of this gadget.
  * @sg_supported: true if we can handle scatter-gather
  * @is_otg: True if the USB device port uses a Mini-AB jack, so that the
  *     gadget driver must provide a USB OTG descriptor.
@@ -562,6 +563,7 @@ struct usb_gadget {
        struct device                   dev;
        unsigned                        out_epnum;
        unsigned                        in_epnum;
+       struct usb_otg_caps             *otg_caps;
 
        unsigned                        sg_supported:1;
        unsigned                        is_otg:1;