[PATCH 8/8] usb: gadget: uvc: configfs: Prevent format changes after linking header

2018-07-31 Thread Laurent Pinchart
From: Joel Pepper While checks are in place to avoid attributes and children of a format being manipulated after the format is linked into the streaming header, the linked flag was never actually set, invalidating the protections. Signed-off-by: Joel Pepper ---

[PATCH 4/8] usb: gadget: uvc: configfs: Add interface number attributes

2018-07-31 Thread Laurent Pinchart
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

[PATCH 7/8] usb: gadget: uvc: configfs: Add bFrameIndex attributes

2018-07-31 Thread Laurent Pinchart
From: Joel Pepper - Add bFrameIndex as a UVCG_FRAME_ATTR_RO for each frame size. - Automatically assign ascending bFrameIndex to each frame in a format. Before all "bFrameindex" attributes were set to "1" with no way to configure the gadget otherwise. This resulted in the host always

[PATCH 2/8] usb: gadget: uvc: configfs: Add section header comments

2018-07-31 Thread Laurent Pinchart
The UVC configfs implementation is large and difficult to navigate. Add a bit more air to the code to make it easier to read. Signed-off-by: Laurent Pinchart --- drivers/usb/gadget/function/uvc_configfs.c | 120 ++--- 1 file changed, 91 insertions(+), 29 deletions(-)

[PATCH 0/8] usb: gadget: uvc: Improve configfs support

2018-07-31 Thread Laurent Pinchart
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)

[PATCH 1/8] usb: gadget: uvc: configfs: Don't wrap groups unnecessarily

2018-07-31 Thread Laurent Pinchart
Various configfs groups (represented by config_group) as wrapped in structures that they're the only member of. This allows adding other data fields to groups, but is unnecessarily makes the code more complex. Remove the outter structures and use config_group directly to simplify the code. Groups

[PATCH 3/8] usb: gadget: uvc: configfs: Allocate groups dynamically

2018-07-31 Thread Laurent Pinchart
The UVC configfs implementation creates all groups as global static variables. This prevents creationg of multiple UVC function instances, as they would all require their own configfs group instances. Fix this by allocating all groups dynamically. To avoid duplicating code around, extend the

[PATCH 5/8] usb: gadget: uvc: configfs: Add bFormatIndex attributes

2018-07-31 Thread Laurent Pinchart
The UVC format description are numbered using the descriptor's bFormatIndex field. The index is used in UVC requests, and is thus needed to handle requests in userspace. Make it dynamically discoverable by exposing it in a bFormatIndex configfs attribute of the uncompressed and mjpeg format config

[PATCH 6/8] usb: gadget: uvc: configfs: Document the bFormatIndex attribute

2018-07-31 Thread Laurent Pinchart
Document for the bFormatIndex attribute of the format descriptors is missing. Add it. Signed-off-by: Laurent Pinchart --- Documentation/ABI/testing/configfs-usb-gadget-uvc | 8 1 file changed, 8 insertions(+) diff --git a/Documentation/ABI/testing/configfs-usb-gadget-uvc

Re: [PATCH v7] usb: gadget: uvc: configfs: Add bFrameIndex attributes

2018-07-31 Thread Felipe Balbi
Hi, Laurent Pinchart writes: > Hi Felipe, > > On Thursday, 26 July 2018 13:49:07 EEST Felipe Balbi wrote: >> Laurent Pinchart writes: >> > From: Joel Pepper >> > >> > - Add bFrameIndex as a UVCG_FRAME_ATTR_RO for each frame size. >> > - Automatically assign ascending bFrameIndex to each

RE: Duo Security

2018-07-31 Thread Donna Butler
From: Donna Butler Sent: Tuesday, July 31, 2018 7:51 AM Subject: Duo Security Hello, We are now rolling out Duo Security, a friendly and secure way for you to log into your organization's applications. You have been invited to set up your account for Duo Security, so you can start logging

Re: [PATCH -next] usb: dwc3: pci: Fix return value check in dwc3_byt_enable_ulpi_refclock()

2018-07-31 Thread Hans de Goede
Hi, On 31-07-18 16:38, Wei Yongjun wrote: In case of error, the function pcim_iomap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: 7740d04d901d ("usb: dwc3: pci: Enable ULPI Refclk on platforms where the firmware

[PATCH -next] usb: dwc3: pci: Fix return value check in dwc3_byt_enable_ulpi_refclock()

2018-07-31 Thread Wei Yongjun
In case of error, the function pcim_iomap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: 7740d04d901d ("usb: dwc3: pci: Enable ULPI Refclk on platforms where the firmware does not") Signed-off-by: Wei Yongjun ---

Re: [PATCH v7] usb: gadget: uvc: configfs: Add bFrameIndex attributes

2018-07-31 Thread Laurent Pinchart
Hi Felipe, On Thursday, 26 July 2018 13:49:07 EEST Felipe Balbi wrote: > Laurent Pinchart writes: > > From: Joel Pepper > > > > - Add bFrameIndex as a UVCG_FRAME_ATTR_RO for each frame size. > > - Automatically assign ascending bFrameIndex to each frame in a format. > > > > Before all

RE: fusb302 type-c chip driver supply cutting out

2018-07-31 Thread Adam Thomson
On 27 July 2018 17:41, Tim Harvey wrote: Adding Guenter to the thread. > Greetings, > > I have a custom design with a Fairchild FUSB302 Type-C chip driver > that I'm testing with Linux 4.17 and a BTI AC-60TC 60W charger. For > this design we are using Type-C as a power/charger input only - no >

Re: [PATCH 2/3] usb: dwc3: gadget: Don't skip updating remaining data

2018-07-31 Thread Felipe Balbi
Thinh Nguyen writes: > Hi Felipe, > > On 7/29/2018 11:08 PM, Felipe Balbi wrote: >> Thinh Nguyen writes: >>> DWC3 must check for the BUFSIZ and update the req->remaining >>> regardless of transfer alignment. Returning early from transfer OUT >>> unalignment will skip updating the