From patchwork Wed Aug 1 00:29:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 10551579 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4347313B8 for ; Wed, 1 Aug 2018 00:28:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F60F2AFB3 for ; Wed, 1 Aug 2018 00:28:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 23BEB2AFEA; Wed, 1 Aug 2018 00:28:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D32C2AFB3 for ; Wed, 1 Aug 2018 00:28:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732916AbeHACL3 (ORCPT ); Tue, 31 Jul 2018 22:11:29 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:33688 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732880AbeHACL3 (ORCPT ); Tue, 31 Jul 2018 22:11:29 -0400 Received: from avalon.bb.dnainternet.fi (dfj612ybrt5fhg77mgycy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:2e86:4862:ef6a:2804]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0852CB86; Wed, 1 Aug 2018 02:28:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1533083316; bh=VpAY4AMKrUMROBo0MYDPzfj1uuCVgwUP7sWt9RtMSbE=; h=From:To:Cc:Subject:Date:From; b=WAIv0+XcAOEo9Yz8lWb58sVlmGJ/garogLonvRKHpGpUxR45SN7T5xowIVP8MjXc8 3LaLfWP5VBM23Y1LZV1/f8nbGtnriIWGFVREQttebPN/tGx4gPJ9WUayk1jZ40e8wR XyISXKR84nyc+V8SUfpWJggUJNCUzQOqffmfTumA= From: Laurent Pinchart To: linux-usb@vger.kernel.org Cc: Felipe Balbi , Joel Pepper , Kieran Bingham , Andrzej Pietrasiewicz Subject: [PATCH 0/8] usb: gadget: uvc: Improve configfs support Date: Wed, 1 Aug 2018 03:29:01 +0300 Message-Id: <20180801002909.2890-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.16.4 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hello, This patch series reworks the UVC gadget function configfs implementation to support multiple UVC functions in a single device and The first two patches simplify the code (01/08) and improve readability (02/08). The series then moves to dynamically allocating all configfs groups (03/08) to support multiple instances. As a consequence we have to expose the interface numbers through new configfs attributes (04/08) in order to let the userspace helper application discover them. The next three patches add and document new bFormatIndex (05/08 and 06/08) and bFrameIndex (07/08) configfs attributes to expose indices of UVC format and frame descriptors to userspace, allowing their dynamic discovery. The last patch finally fixes a bug that allowed modification of descriptors after linking them (08/08). Felipe, all this is based on top of your testing/next branch, and is a candidate for v4.20. Please let me know if I should base the patches on a different branch. Joel Pepper (2): usb: gadget: uvc: configfs: Add bFrameIndex attributes usb: gadget: uvc: configfs: Prevent format changes after linking header Laurent Pinchart (6): usb: gadget: uvc: configfs: Don't wrap groups unnecessarily usb: gadget: uvc: configfs: Add section header comments usb: gadget: uvc: configfs: Allocate groups dynamically usb: gadget: uvc: configfs: Add interface number attributes usb: gadget: uvc: configfs: Add bFormatIndex attributes usb: gadget: uvc: configfs: Document the bFormatIndex attribute Documentation/ABI/testing/configfs-usb-gadget-uvc | 16 + drivers/usb/gadget/function/f_uvc.c | 10 +- drivers/usb/gadget/function/u_uvc.h | 3 + drivers/usb/gadget/function/uvc_configfs.c | 821 +++++++++++++--------- 4 files changed, 532 insertions(+), 318 deletions(-)