From: John Youn Date: Sat, 6 Feb 2016 01:05:26 +0000 (-0800) Subject: usb: gadget: Add gadget_is_superspeed_plus() X-Git-Tag: next-20160307~24^2^2~86 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1ca1b6a65ba7771ab8d16971b5fc40f9ba7a0e53;p=karo-tx-linux.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 d82d0068872b..d6a1bdaf11c1 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h @@ -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