mbox series

[0/4] Add XU support to UVC Gadget

Message ID 20221102151755.1022841-1-dan.scally@ideasonboard.com (mailing list archive)
Headers show
Series Add XU support to UVC Gadget | expand

Message

Dan Scally Nov. 2, 2022, 3:17 p.m. UTC
Hello all

This series adds support for the definition of extension units in configfs for
the UVC Gadget. The XUs are modelled as config_items within a new "extensions"
group under control, which seemed like an appropriate place to put them.

To allow the XU's to be inserted in the function graph, the bSourceID attribute
for the default output terminal is made writeable - users will need to configure
it with the bUnitID of the XU that they want to use as the OT's source. This does
mean that the XUs can _only_ be placed immediately preceding the OT, but I think
that that's fine for now.

The XUs configured through this series have been tested via uvc-gadget, uvcvideo
and uvcdynctrl.

Thanks
Dan


Daniel Scally (4):
  usb: gadget: uvc: Make bSourceID read/write
  usb: gadget: uvc: Generalise helper functions for reuse
  usb: gadget: uvc: Allow definition of XUs in configfs
  usb: gadget: uvc: Copy XU descriptors during .bind()

 drivers/usb/gadget/function/f_uvc.c        |  44 ++
 drivers/usb/gadget/function/u_uvc.h        |   7 +
 drivers/usb/gadget/function/uvc.h          |   1 +
 drivers/usb/gadget/function/uvc_configfs.c | 580 +++++++++++++++++++--
 drivers/usb/gadget/function/uvc_configfs.h |  29 ++
 5 files changed, 607 insertions(+), 54 deletions(-)