diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2018-05-23 18:47:56 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2018-09-24 18:54:26 +0300 |
commit | bf71544883a1ccb20021eb5139475496dbd8abd9 (patch) | |
tree | e9614859bafc12c92acfa0ff9f09f27eb10fa939 /drivers/usb/gadget/function/u_uvc.h | |
parent | efbf0af70b4f7ee6ed1533ed0d905255c0545e08 (diff) |
usb: gadget: uvc: configfs: Add interface number attributes
The video control and video streaming interface numbers are needed in
the UVC gadget userspace stack to reply to UVC requests. They are
hardcoded to fixed values at the moment, preventing configurations with
multiple functions.
To fix this, make them dynamically discoverable by userspace through
read-only configfs attributes in <function>/control/bInterfaceNumber and
<function>/streaming/bInterfaceNumber respectively.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'drivers/usb/gadget/function/u_uvc.h')
-rw-r--r-- | drivers/usb/gadget/function/u_uvc.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/gadget/function/u_uvc.h b/drivers/usb/gadget/function/u_uvc.h index 2ed292e94fbc..5242d489e20a 100644 --- a/drivers/usb/gadget/function/u_uvc.h +++ b/drivers/usb/gadget/function/u_uvc.h @@ -25,6 +25,9 @@ struct f_uvc_opts { unsigned int streaming_maxpacket; unsigned int streaming_maxburst; + unsigned int control_interface; + unsigned int streaming_interface; + /* * Control descriptors array pointers for full-/high-speed and * super-speed. They point by default to the uvc_fs_control_cls and |