Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1ca1b6a6 authored by John Youn's avatar John Youn Committed by Felipe Balbi
Browse files

usb: gadget: Add gadget_is_superspeed_plus()



Add a function to check for SuperSpeedPlus capable gadgets.

Signed-off-by: default avatarJohn Youn <johnyoun@synopsys.com>
Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
parent 446fa3a9
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -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