diff options
author | Daniel Scally <dan.scally@ideasonboard.com> | 2023-02-06 16:17:54 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-02-07 08:46:36 +0100 |
commit | 0525210c9840229e42c6b68e886c72a75a67cf8e (patch) | |
tree | 8bb09e3e11994863acd734b4cf28f38591d96d03 /drivers/usb/gadget/function/u_uvc.h | |
parent | 0df28607c5cb4fe60bba591e9858a8f7ba39aa4a (diff) | |
download | lwn-0525210c9840229e42c6b68e886c72a75a67cf8e.tar.gz lwn-0525210c9840229e42c6b68e886c72a75a67cf8e.zip |
usb: gadget: uvc: Allow definition of XUs in configfs
The UVC gadget at present has no support for extension units. Add the
infrastructure to uvc_configfs.c that allows users to create XUs via
configfs. These will be stored in a new child of uvcg_control_grp_type
with the name "extensions".
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
Link: https://lore.kernel.org/r/20230206161802.892954-4-dan.scally@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/gadget/function/u_uvc.h')
-rw-r--r-- | drivers/usb/gadget/function/u_uvc.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/gadget/function/u_uvc.h b/drivers/usb/gadget/function/u_uvc.h index 67cf319e9c2d..0345b8fc36ff 100644 --- a/drivers/usb/gadget/function/u_uvc.h +++ b/drivers/usb/gadget/function/u_uvc.h @@ -28,6 +28,7 @@ struct f_uvc_opts { unsigned int control_interface; unsigned int streaming_interface; char function_name[32]; + unsigned int last_unit_id; bool enable_interrupt_ep; @@ -66,6 +67,12 @@ struct f_uvc_opts { struct uvc_descriptor_header *uvc_ss_control_cls[5]; /* + * Control descriptors for extension units. There could be any number + * of these, including none at all. + */ + struct list_head extension_units; + + /* * Streaming descriptors for full-speed, high-speed and super-speed. * Used by configfs only, must not be touched by legacy gadgets. The * arrays are allocated at runtime as the number of descriptors isn't |