From: John Youn Date: Sat, 6 Feb 2016 01:05:26 +0000 (-0800) Subject: usb: gadget: Add gadget_is_superspeed_plus() X-Git-Tag: v4.14-rc1~3635^2~4^2~86 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1ca1b6a65ba7771ab8d16971b5fc40f9ba7a0e53;p=platform%2Fkernel%2Flinux-rpi.git usb: gadget: Add gadget_is_superspeed_plus() Add a function to check for SuperSpeedPlus capable gadgets. Signed-off-by: John Youn Signed-off-by: Felipe Balbi --- diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index d82d006..d6a1bda 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h @@ -729,6 +729,16 @@ static inline int gadget_is_superspeed(struct usb_gadget *g) } /** + * 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 *