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

Commit d9f0a42e authored by Mayank Rana's avatar Mayank Rana Committed by Hemant Kumar
Browse files

usb: gadget: Update functions for SSP descriptors



This change updates USB function drivers to assign SSP descriptors
using usb_assign_descriptors() API. USB SSP descriptors are needed
to enumerate these functions as different composite device in
super speed plus mode.

Change-Id: Iea4d623afb2bf572358d1cc1d0673f20f2d7d5aa
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
Signed-off-by: default avatarHemant Kumar <hemantk@codeaurora.org>
parent 40d1a49d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -3075,6 +3075,7 @@ static int _ffs_func_bind(struct usb_configuration *c,
			ret = ss_len;
			goto error;
		}
		func->function.ssp_descriptors = func->function.ss_descriptors;
	} else {
		ss_len = 0;
	}
@@ -3476,6 +3477,7 @@ static void ffs_func_unbind(struct usb_configuration *c,
	func->function.fs_descriptors = NULL;
	func->function.hs_descriptors = NULL;
	func->function.ss_descriptors = NULL;
	func->function.ssp_descriptors = NULL;
	func->interfaces_nums = NULL;

	ffs_event_add(ffs, FUNCTIONFS_UNBIND);
+1 −1
Original line number Diff line number Diff line
@@ -1508,7 +1508,7 @@ static int ncm_bind(struct usb_configuration *c, struct usb_function *f)
		fs_ncm_notify_desc.bEndpointAddress;

	status = usb_assign_descriptors(f, ncm_fs_function, ncm_hs_function,
			ncm_ss_function, NULL);
			ncm_ss_function, ncm_ss_function);
	if (status)
		goto fail;