[PATCH 27/82] usb: musb: make use of new usb_endpoint_maxp_mult()

2016-10-31 Thread Felipe Balbi
We have introduced a helper to calculate multiplier value from wMaxPacketSize. Start using it. Cc: Bin Liu Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_gadget.c | 6 +++--- drivers/usb/musb/musb_host.c | 2 +- 2 files changed, 4

[PATCH 18/82] usb: gadget: udc: bdc: make use of new usb_endpoint_maxp_mult()

2016-10-31 Thread Felipe Balbi
We have introduced a helper to calculate multiplier value from wMaxPacketSize. Start using it. Cc: Ashwini Pahuja Cc: Signed-off-by: Felipe Balbi --- drivers/usb/gadget/udc/bdc/bdc_cmd.c | 2 +- 1 file changed,

[PATCH 29/82] usb: host: xhci: purge GET_MAX_PACKET()

2016-10-31 Thread Felipe Balbi
usb_endpoint_maxp() is now returning maxpacket correctly - iow only bits 10:0. We can finaly remove XHCI's private GET_MAX_PACKET macro. Signed-off-by: Felipe Balbi --- drivers/usb/host/xhci-mem.c | 4 ++-- drivers/usb/host/xhci-mtk-sch.c | 4 ++--

[PATCH 30/82] media: usb: uvc: remove unnecessary & operation

2016-10-31 Thread Felipe Balbi
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver. Cc: Laurent Pinchart Cc: Mauro Carvalho Chehab Cc: Acked-by: Laurent Pinchart

[PATCH 32/82] usb: core: devices: remove unnecessary & operation

2016-10-31 Thread Felipe Balbi
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver. Cc: Greg Kroah-Hartman Cc: Acked-by: Greg Kroah-Hartman Signed-off-by: Felipe

[PATCH 22/82] usb: gadget: udc: gr: make use of new usb_endpoint_maxp_mult()

2016-10-31 Thread Felipe Balbi
We have introduced a helper to calculate multiplier value from wMaxPacketSize. Start using it. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/udc/gr_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/gr_udc.c

[PATCH 09/82] usb: dwc3: debug: decode control endpoint phase too

2016-10-31 Thread Felipe Balbi
DWC3 can tell us which phase of a setup transfer we're getting into. Let's decode it from the event to make it easier to debug. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/core.h | 1 + drivers/usb/dwc3/debug.h | 13 + 2 files changed, 14

[PATCH 10/82] usb: dwc3: gadget: remove redundant trace prints

2016-10-31 Thread Felipe Balbi
Removing some trace prints which were made redundant when we started decoding events and TRBs completely within their respective trace points. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/ep0.c| 17 + drivers/usb/dwc3/gadget.c | 43

[PATCH 08/82] usb: dwc3: gadget: conditionally disable Link State change events

2016-10-31 Thread Felipe Balbi
Link State Change events are only needed for debugging and to apply certain workarounds on known errata. Let's save a few cycles by disabling these events completely on working revisions of the core. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 4

[PATCH 02/82] usb: gadget: composite: correctly initialize ep->maxpacket

2016-10-31 Thread Felipe Balbi
usb_endpoint_maxp() returns wMaxPacketSize in its raw form. Without taking into consideration that it also contains other bits reserved for isochronous endpoints. This patch fixes one occasion where this is a problem by making sure that we initialize ep->maxpacket only with lower 10 bits of the

[PATCH 06/82] usb: dwc3: gadget: make use of No Response Update Transfer

2016-10-31 Thread Felipe Balbi
No Response Update Transfer is a special type of Update Transfer command which can be used whenever we're not relying on XferNotReady to prepare transfers. With this, we don't need to wait for CMDACT to be cleared and issue further commands to the endpoint straight away. Let's start using this

[PATCH 04/82] usb: dwc3: gadget: set PCM1 field of isochronous-first TRBs

2016-10-31 Thread Felipe Balbi
In case of High-Speed, High-Bandwidth endpoints, we need to tell DWC3 that we have more than one packet per interval. We do that by setting PCM1 field of Isochronous-First TRB. Cc: Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c |

[PATCH 00/82] usb: patch bomb

2016-10-31 Thread Felipe Balbi
Hi guys, Sorry for the patch bomb, but I wanted to make sure everyoby knows which patches are already queued up for the next window. They are still sitting in my testing/next branch, so I can still change any of them. Please make sure to go through each one of them. This very branch has been

[PATCH 03/82] usb: gadget: composite: always set ep->mult to a sensible value

2016-10-31 Thread Felipe Balbi
ep->mult is supposed to be set to Isochronous and Interrupt Endapoint's multiplier value. This value is computed from different places depending on the link speed. If we're dealing with HighSpeed, then it's part of bits [12:11] of wMaxPacketSize. This case wasn't taken into consideration before.

[PATCH 01/82] usb: add helper to extract bits 12:11 of wMaxPacketSize

2016-10-31 Thread Felipe Balbi
According to USB Specification 2.0 table 9-4, wMaxPacketSize is a bitfield. Endpoint's maxpacket is laid out in bits 10:0. For high-speed, high-bandwidth isochronous endpoints, bits 12:11 contain a multiplier to tell us how many transactions we want to try per uframe. This means that if we want

[PATCH 05/82] usb: dwc3: gadget: properly check ep cmd

2016-10-31 Thread Felipe Balbi
The cmd argument we pass to dwc3_send_gadget_ep_cmd() could contain extra arguments embedded. When checking for StartTransfer command, we need to make sure to match only lower 4 bits which contain the actual command and ignore the rest. Reported-by: Janusz Dziedzic

[PATCH 07/82] usb: dwc3: gadget: giveback request if we can't kick it

2016-10-31 Thread Felipe Balbi
There might be situations where a Start Transfer command might fail, if that ever happens, instead of simply removing the request from our list, we should give the request back to the gadget driver, otherwise we might eventually starve it from requests. Signed-off-by: Felipe Balbi

[balbi-usb:testing/next 82/82] drivers/usb/dwc3/dwc3-pci.c:118:4: error: implicit declaration of function 'acpi_str_to_uuid'

2016-10-31 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git testing/next head: 43f960528708df4edd74d176266f611b0e127772 commit: 43f960528708df4edd74d176266f611b0e127772 [82/82] usb: dwc3: pci: call _DSM for suspend/resume config: arm-multi_v7_defconfig (attached as .config) compiler:

Re: [PATCH v10 1/1] USB: serial: cp210x: Adding GPIO support for CP2105

2016-10-31 Thread Martyn Welch
On Tue, Oct 25, 2016 at 11:34:40AM +0200, Linus Walleij wrote: > Good work on this patch, nice that it got merged. > > I was just thinking that as an add-on, you may want to name > the gpio lines so they have meaningful names in userspace > when you use this with the chardev (I have reasons to

Re: Identifying Synopsys USB3 Controller on Baytrail Device

2016-10-31 Thread Felipe Balbi
Hi, Joseph Kogut writes: > Well, after comparing the kernel log from both systems, it seems that > the device controller simply isn't being enumerated by the kernel for > some reason. > > Here's the relevant section from the Android kernel: > > <6>[0.612857] PCI host

<    1   2