Skip to content

Commit

Permalink
usb: gadget: Add gadget_is_superspeed_plus()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
John Youn authored and Felipe Balbi committed Mar 4, 2016
1 parent 446fa3a commit 1ca1b6a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions include/linux/usb/gadget.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1ca1b6a

Please sign in to comment.