diff options
author | John Youn <John.Youn@synopsys.com> | 2016-02-05 17:05:26 -0800 |
---|---|---|
committer | Felipe Balbi <balbi@kernel.org> | 2016-03-04 15:14:22 +0200 |
commit | 1ca1b6a65ba7771ab8d16971b5fc40f9ba7a0e53 (patch) | |
tree | fa8294997c9a5bbdc00567086fe5c66daa05521a /include/linux/usb/gadget.h | |
parent | 446fa3a95df1e8b78f25e1babc41e46edd200821 (diff) |
usb: gadget: Add gadget_is_superspeed_plus()
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>
Diffstat (limited to 'include/linux/usb/gadget.h')
-rw-r--r-- | include/linux/usb/gadget.h | 10 |
1 files changed, 10 insertions, 0 deletions
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 @@ -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 * |