usb: gadget: Add gadget_is_superspeed_plus()
authorJohn Youn <John.Youn@synopsys.com>
Sat, 6 Feb 2016 01:05:26 +0000 (17:05 -0800)
committerFelipe Balbi <balbi@kernel.org>
Fri, 4 Mar 2016 13:14:22 +0000 (15:14 +0200)
Add a function to check for SuperSpeedPlus capable gadgets.

Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
include/linux/usb/gadget.h

index d82d006..d6a1bda 100644 (file)
@@ -728,6 +728,16 @@ static inline int gadget_is_superspeed(struct usb_gadget *g)
        return g->max_speed >= USB_SPEED_SUPER;
 }
 
+/**
+ * gadget_is_superspeed_plus() - return true if the hardware handles
+ *     superspeed plus
+ * @g: controller that might support superspeed plus
+ */
+static inline int gadget_is_superspeed_plus(struct usb_gadget *g)
+{
+       return g->max_speed >= USB_SPEED_SUPER_PLUS;
+}
+
 /**
  * gadget_is_otg - return true iff the hardware is OTG-ready
  * @g: controller that might have a Mini-AB connector