mbox series

[0/3] Add ability to disable UVC Gadget's interrupt endpoint

Message ID 20221205143758.1096914-1-dan.scally@ideasonboard.com (mailing list archive)
Headers show
Series Add ability to disable UVC Gadget's interrupt endpoint | expand

Message

Dan Scally Dec. 5, 2022, 2:37 p.m. UTC
The UVC Gadget includes a hardcoded interrupt endpoint against the VideoControl
interface, though it is misnamed as a control endpoint (the default endpoint 0
is actually used for that role). The UVC specification says that this is an
optional feature of a UVC compliant camera provided certain scenarios don't hold
true, specifically...

1. The device supports hardware triggers for still image capture
2. The device implements any AutoUpdate controls
3. The device implements any Asynchronous controls

Those are all scenarios that will be determined by userspace, meaning that in some
implementations the interrupt endpoint is unnecessary. This series adds the means
to disable it, though retains the current behaviour as the default.

Daniel Scally (3):
  usb: gadget: uvc: Rename uvc_control_ep
  usb: gadget: uvc: Add new disable_interrupt_ep attribute
  usb: gadget: uvc: Allow disabling of interrupt endpoint

 drivers/usb/gadget/function/f_uvc.c        | 46 +++++++++++--------
 drivers/usb/gadget/function/u_uvc.h        |  2 +
 drivers/usb/gadget/function/uvc.h          |  3 +-
 drivers/usb/gadget/function/uvc_configfs.c | 53 ++++++++++++++++++++++
 4 files changed, 85 insertions(+), 19 deletions(-)