]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
usb: gadget: uvc: configfs: Add interface number attributes
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Wed, 23 May 2018 15:47:56 +0000 (18:47 +0300)
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Mon, 24 Sep 2018 15:54:26 +0000 (18:54 +0300)
commitbf71544883a1ccb20021eb5139475496dbd8abd9
treee9614859bafc12c92acfa0ff9f09f27eb10fa939
parentefbf0af70b4f7ee6ed1533ed0d905255c0545e08
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>
Documentation/ABI/testing/configfs-usb-gadget-uvc
drivers/usb/gadget/function/f_uvc.c
drivers/usb/gadget/function/u_uvc.h
drivers/usb/gadget/function/uvc_configfs.c