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

usb: gadget: Update config for SuperSpeedPlus

When a function is added to a configuration with usb_add_function(), the
configuration speed flags are updated. These flags indicate for which
speeds the configuration is valid for.

This patch adds a flag in the configuration for SuperSpeedPlus and
also updates this based on the existence of ssp_descriptors.

Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>

authored by

John Youn and committed by
Felipe Balbi
554eead5 f5c61225

+4
+2
drivers/usb/gadget/composite.c
··· 237 237 config->highspeed = true; 238 238 if (!config->superspeed && function->ss_descriptors) 239 239 config->superspeed = true; 240 + if (!config->superspeed_plus && function->ssp_descriptors) 241 + config->superspeed_plus = true; 240 242 241 243 done: 242 244 if (value)
+1
drivers/usb/gadget/configfs.c
··· 1229 1229 } 1230 1230 c->next_interface_id = 0; 1231 1231 memset(c->interface, 0, sizeof(c->interface)); 1232 + c->superspeed_plus = 0; 1232 1233 c->superspeed = 0; 1233 1234 c->highspeed = 0; 1234 1235 c->fullspeed = 0;
+1
include/linux/usb/composite.h
··· 322 322 unsigned superspeed:1; 323 323 unsigned highspeed:1; 324 324 unsigned fullspeed:1; 325 + unsigned superspeed_plus:1; 325 326 struct usb_function *interface[MAX_CONFIG_INTERFACES]; 326 327 }; 327 328