usb: gadget: Introduce udc_set_ssp_rate() for SSP
authorThinh Nguyen <Thinh.Nguyen@synopsys.com>
Thu, 14 Jan 2021 02:53:07 +0000 (18:53 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Jan 2021 17:40:08 +0000 (18:40 +0100)
commitead4c124852e66b6aa033e34cf9c4f08d40aeffc
tree81931a1eb770559d9d826acbfc1f57af1cd0e971
parentdb615c6264cffcd8f117c5628db1794afbd0f254
usb: gadget: Introduce udc_set_ssp_rate() for SSP

A SuperSpeed Plus device may operate at different speed and lane count
(i.e. gen2x2, gen1x2, or gen2x1). Introduce gadget ops
udc_set_ssp_rate() to set the desire corresponding usb_ssp_rate for
SuperSpeed Plus capable devices.

If the USB device supports different speeds at SuperSpeed Plus, set the
device to operate with the maximum number of lanes and speed.

Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/9b85357cdadc02e3f0d653fd05f89eb46af836e1.1610592135.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/core.c
include/linux/usb/gadget.h