Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: gadget: Introduce SSP rates and lanes

A USB device controller operating in SuperSpeed Plus may support gen2x1,
gen1x2, and/or gen2x2. Introduce SuperSpeed Plus signaling rate
generation and lane count to usb_gadget with the fields ssp_rate and
max_ssp_rate. The gadget driver can use these to setup the device BOS
descriptor and select the desire operating speed and number of lanes.

Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/b6d2196dcc3c73747f91abf9a082b20bbe276cc4.1610592135.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Thinh Nguyen and committed by
Greg Kroah-Hartman
db615c62 121fc3ac

+9
+9
include/linux/usb/gadget.h
··· 339 339 * @speed: Speed of current connection to USB host. 340 340 * @max_speed: Maximal speed the UDC can handle. UDC must support this 341 341 * and all slower speeds. 342 + * @ssp_rate: Current connected SuperSpeed Plus signaling rate and lane count. 343 + * @max_ssp_rate: Maximum SuperSpeed Plus signaling rate and lane count the UDC 344 + * can handle. The UDC must support this and all slower speeds and lower 345 + * number of lanes. 342 346 * @state: the state we are now (attached, suspended, configured, etc) 343 347 * @name: Identifies the controller hardware type. Used in diagnostics 344 348 * and sometimes configuration. ··· 410 406 struct list_head ep_list; /* of usb_ep */ 411 407 enum usb_device_speed speed; 412 408 enum usb_device_speed max_speed; 409 + 410 + /* USB SuperSpeed Plus only */ 411 + enum usb_ssp_rate ssp_rate; 412 + enum usb_ssp_rate max_ssp_rate; 413 + 413 414 enum usb_device_state state; 414 415 const char *name; 415 416 struct device dev;