summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/function/u_uvc.h
diff options
context:
space:
mode:
authorDaniel Scally <dan.scally@ideasonboard.com>2023-02-06 16:18:01 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-02-07 08:46:37 +0100
commitfe625755370be6e3945c53bd0ffb4f4db0c4a73c (patch)
treec36a1acdd7311878059b4864f0741e7fb359e4ab /drivers/usb/gadget/function/u_uvc.h
parent9963f7440f4044bd4262d99fdd0a5827131bd934 (diff)
downloadlwn-fe625755370be6e3945c53bd0ffb4f4db0c4a73c.tar.gz
lwn-fe625755370be6e3945c53bd0ffb4f4db0c4a73c.zip
usb: gadget: uvc: Allow linking function to string descs
Currently the string descriptors for the IAD and VideoStreaming Interfaces are hardcoded into f_uvc. Now that we can create arbitrary string descriptors, add a mechanism to define string descriptors for the IAD, VC and VS interfaces by linking to the appropriate directory at function level. Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com> Link: https://lore.kernel.org/r/20230206161802.892954-11-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.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/gadget/function/u_uvc.h b/drivers/usb/gadget/function/u_uvc.h
index 0345b8fc36ff..1ce58f61253c 100644
--- a/drivers/usb/gadget/function/u_uvc.h
+++ b/drivers/usb/gadget/function/u_uvc.h
@@ -83,6 +83,14 @@ struct f_uvc_opts {
struct uvc_descriptor_header **uvc_ss_streaming_cls;
/*
+ * Indexes into the function's string descriptors allowing users to set
+ * custom descriptions rather than the hard-coded defaults.
+ */
+ u8 iad_index;
+ u8 vs0_index;
+ u8 vs1_index;
+
+ /*
* Read/write access to configfs attributes is handled by configfs.
*
* This lock protects the descriptors from concurrent access by