Re: [PATCH 2/2] usb: dwc3: add clock and resets

2018-03-28 Thread Masahiro Yamada
2018-03-19 7:37 GMT+09:00 Masahiro Yamada : > Hi Rob, > > 2018-03-18 21:52 GMT+09:00 Rob Herring : >> On Thu, Mar 15, 2018 at 08:39:58PM +0900, Masahiro Yamada wrote: >>> dwc3-of-simple.c only handles arbitrary number of clocks and resets. >>> They

[PATCH v8 2/2] usb/gadget: Add driver for Aspeed SoC virtual hub

2018-03-28 Thread Benjamin Herrenschmidt
The Aspeed BMC SoCs support a "virtual hub" function. It provides some HW support for a top-level USB2 hub behind which sit 5 gadget "ports". This driver adds support for the full functionality, emulating the hub standard requests and exposing 5 UDC gadget drivers corresponding to the ports. The

Re: [PATCH v4 2/2] dt-bindings: usb: rt1711h device tree binding document

2018-03-28 Thread Rob Herring
On Tue, Mar 27, 2018 at 9:30 AM, 李書帆 wrote: > Hi Rob, > > 2018-03-27 6:23 GMT+08:00 Rob Herring : >> On Tue, Mar 20, 2018 at 05:15:04PM +0800, ShuFan Lee wrote: >>> From: ShuFan Lee >>> >>> Add device tree binding document for Richtek

[PATCH v8 1/2] usb/gadget: Constify usb_gadget_get_string "table" argument

2018-03-28 Thread Benjamin Herrenschmidt
The table is never modified by the function. This allows us to use it on a statically defined table that is marked const. Signed-off-by: Benjamin Herrenschmidt --- drivers/usb/gadget/usbstring.c | 2 +- include/linux/usb/gadget.h | 2 +- 2 files changed, 2

[PATCH -next] usb: dwc3: gadget: dwc3_gadget_del_and_unmap_request() can be static

2018-03-28 Thread Wei Yongjun
Fixes the following sparse warning: drivers/usb/dwc3/gadget.c:169:6: warning: symbol 'dwc3_gadget_del_and_unmap_request' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- drivers/usb/dwc3/gadget.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH -next] usb: roles: Fix potential NULL dereference in intel_xhci_usb_probe()

2018-03-28 Thread Wei Yongjun
platform_get_resource() may fail and return NULL, so we should better check it's return value to avoid a NULL pointer dereference a bit later in the code. This is detected by Coccinelle semantic patch. @@ expression pdev, res, n, t, e, e1, e2; @@ res = platform_get_resource(pdev, t, n); + if

Re: [PATCH v7] usb/gadget: Add driver for Aspeed SoC virtual hub

2018-03-28 Thread Benjamin Herrenschmidt
On Thu, 2018-03-29 at 09:26 +1100, Benjamin Herrenschmidt wrote: > On Thu, 2018-03-29 at 09:19 +1100, Benjamin Herrenschmidt wrote: > > On Tue, 2018-03-27 at 10:30 +0300, Felipe Balbi wrote: > > > $ gcc --version > > > gcc (Debian 7.3.0-12) 7.3.0 > > > > BTW. What debian version while at it ? > >

Re: [PATCH 1/2] usb: gadget: udc: core: update usb_ep_queue() documentation

2018-03-28 Thread Yavuz, Tuba
Sounds good to me. Thanks Felipe. Best, Tuba Yavuz From: Felipe Balbi Sent: Wednesday, March 28, 2018 3:43 AM To: Alan Stern Cc: Greg Kroah-Hartman; Linux USB; Yavuz, Tuba Subject: Re: [PATCH 1/2] usb: gadget: udc: core:

Re: [PATCH v7] usb/gadget: Add driver for Aspeed SoC virtual hub

2018-03-28 Thread Benjamin Herrenschmidt
On Thu, 2018-03-29 at 09:19 +1100, Benjamin Herrenschmidt wrote: > On Tue, 2018-03-27 at 10:30 +0300, Felipe Balbi wrote: > > $ gcc --version > > gcc (Debian 7.3.0-12) 7.3.0 > > BTW. What debian version while at it ? > > I still haven't managed to find a gcc that reproduces this, so I > probably

Re: [PATCH v7] usb/gadget: Add driver for Aspeed SoC virtual hub

2018-03-28 Thread Benjamin Herrenschmidt
On Tue, 2018-03-27 at 10:30 +0300, Felipe Balbi wrote: > $ gcc --version > gcc (Debian 7.3.0-12) 7.3.0 BTW. What debian version while at it ? I still haven't managed to find a gcc that reproduces this, so I probably need to get the exact same distro you are using installed somewhere :-( Cheers,

[PATCH] usb: musb: Support gadget mode when the port is set to dual role

2018-03-28 Thread Paul Kocialkowski
This allows dual-role ports to be reported as having gadget mode by the musb_has_gadget helper. This is required to enable MUSB at all with MUSB glue layers that set the port mode to MUSB_PORT_MODE_DUAL_ROLE at init. Most notably, this allows calling musb_start when needed in the virtual MUSB

Re: Yet another entry for the FTDI serial USB

2018-03-28 Thread Greg KH
On Wed, Mar 28, 2018 at 03:20:18PM +0200, Teichmann, Martin wrote: > Hi list, > > Physik Instrumente uses an FTDI chip for their hardware. I found yet another > new hardware type from them which is not in the FTDI list. Here is a patch > for it. > > Greetings > > Martin > > >From

[PATCH v4 12/13] staging: typec: tcpci: Only touch target bit when enable vconn

2018-03-28 Thread Li Jun
We need regmap_update_bits to avoid touch any other bits when enable or disable vconn. Reviewed-by: Guenter Roeck Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git

[PATCH v4 13/13] staging: typec: tcpci: move tcpci driver out of staging

2018-03-28 Thread Li Jun
Move TCPCI(Typec port controller interface) driver out of staging. Signed-off-by: Li Jun --- drivers/staging/Kconfig| 2 -- drivers/staging/Makefile | 1 - drivers/staging/typec/Kconfig | 14 -- drivers/staging/typec/Makefile

[PATCH v4 11/13] staging: typec: tcpci: keep the not connecting cc line open

2018-03-28 Thread Li Jun
While set polarity, we should keep the not connecting cc line to be open. Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/staging/typec/tcpci.c b/drivers/staging/typec/tcpci.c

[PATCH v4 07/13] staging: typec: tcpci: register port before request irq

2018-03-28 Thread Li Jun
With that we can clear any pending events and the port is registered so driver can be ready to handle typec events once we request irq. Signed-off-by: Peter Chen Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 15 --- 1 file changed, 8

[PATCH v4 09/13] typec: tcpm: add starting value for drp toggling

2018-03-28 Thread Li Jun
As DRP port autonomously toggles the Rp/Rd need a start value to begin with, so add one parameter for it in tcpm_start_drp_toggling. Reviewed-by: Guenter Roeck Signed-off-by: Li Jun --- drivers/usb/typec/tcpm.c | 10 +- 1 file changed, 5

[PATCH v4 08/13] staging: typec: tcpci: enable vbus detection

2018-03-28 Thread Li Jun
TCPCI implementation may need SW to enable VBUS detection to generate power status events. Reviewed-by: Guenter Roeck Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 6 ++ 1 file changed, 6 insertions(+) diff --git

[PATCH v4 10/13] usb: typec: tcpm: set cc for drp toggling attach

2018-03-28 Thread Li Jun
In case of drp toggling, we may need set correct cc value for role control after attach as it may never been set. Signed-off-by: Li Jun --- drivers/usb/typec/tcpm.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index

[PATCH v4 03/13] staging: typec: tcpci: add compatible string for nxp ptn5110

2018-03-28 Thread Li Jun
Add nxp ptn5110 typec controller compatible string: usb-tcpci,ptn5110, which is a standard tcpci chip with power delivery support. Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/typec/tcpci.c

[PATCH v4 06/13] usb: typec: tcpm: support get typec and pd config from device properties

2018-03-28 Thread Li Jun
This patch adds support of get typec and power delivery config from firmware description. Signed-off-by: Li Jun --- drivers/usb/typec/tcpm.c | 140 ++- 1 file changed, 115 insertions(+), 25 deletions(-) diff --git

[PATCH v4 02/13] dt-bindings: usb: add documentation for typec port controller(TCPCI)

2018-03-28 Thread Li Jun
TCPCI stands for typec port controller interface, its implementation has full typec port control with power delivery support, it's a standard i2c slave with GPIO input as irq interface, detail see spec "Universal Serial Bus Type-C Port Controller Interface Specification Revision 1.0, Version 1.1"

[PATCH v4 05/13] usb: typec: add API to get typec basic port power and data config

2018-03-28 Thread Li Jun
This patch adds 3 APIs to get the typec port power and data type, and preferred power role by its name string. Suggested-by: Heikki Krogerus Signed-off-by: Li Jun --- drivers/usb/typec/class.c | 52 +++

[PATCH v4 04/13] usb: typec: add fwnode to tcpc

2018-03-28 Thread Li Jun
Add fwnode handle to get the fwnode so we can get typec configs it contains. Suggested-by: Heikki Krogerus Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 14 +++--- drivers/usb/typec/tcpm.c | 1 +

[PATCH v4 01/13] dt-bindings: connector: add properties for typec

2018-03-28 Thread Li Jun
Add bingdings supported by current typec driver, so user can pass all those properties via dt. Signed-off-by: Li Jun --- .../bindings/connector/usb-connector.txt | 39 ++ 1 file changed, 39 insertions(+) diff --git

[PATCH v4 00/13] staging: typec: tcpci: move out of staging

2018-03-28 Thread Li Jun
This patch set attempts to move the tcpci driver out of staging by fix some tcpci driver issues and define typec and power delivery device properties, the changes are verified on NXP PTN5110, which is a standard tcpci typec port controller device with power delivery support, tested power source

[PATCH -next] usb: dwc2: pci: Fix error return code in dwc2_pci_probe()

2018-03-28 Thread Wei Yongjun
Fix to return error code -ENOMEM from the alloc fail error handling case instead of 0, as done elsewhere in this function. Fixes: ecd29dabb2ba ("usb: dwc2: pci: Handle error cleanup in probe") Signed-off-by: Wei Yongjun --- drivers/usb/dwc2/pci.c | 4 +++- 1 file

Yet another entry for the FTDI serial USB

2018-03-28 Thread Teichmann, Martin
Hi list, Physik Instrumente uses an FTDI chip for their hardware. I found yet another new hardware type from them which is not in the FTDI list. Here is a patch for it. Greetings Martin >From de5ba08836b6b8fc851a481404295ccad7b7fc62 Mon Sep 17 00:00:00 2001 From: Martin Teichmann

Re: [PATCH v2 1/1] usb: xhci: do not create and register shared_hcd when USB3.0 is disabled

2018-03-28 Thread Thang Q. Nguyen
On Mon, Mar 5, 2018 at 5:22 PM, Thang Q. Nguyen wrote: > On Mon, Jan 29, 2018 at 5:24 PM, Thang Q. Nguyen wrote: >> From: Tung Nguyen >> >> Currently, hcd->shared_hcd always creates and registers to the usb-core. >> If, for some reasons,

Re: [PATCH 1/2] usb: gadget: udc: core: update usb_ep_queue() documentation

2018-03-28 Thread Felipe Balbi
Hi, Alan Stern writes: >> Alan Stern writes: >> > On Mon, 26 Mar 2018, Felipe Balbi wrote: >> > >> >> Mention that ->complete() should never be called from within >> >> usb_ep_queue(). >> >> >> >> Signed-off-by: Felipe Balbi

Re: [PATCH] usb: gadget: udc: core: Document the relation between usb_ep_queue() and completion callback

2018-03-28 Thread Felipe Balbi
Hi, Alan Stern writes: > Improve the kerneldoc for usb_ep_queue() to note explicitly that the > request's completion routine will be called if and only if the return > value is 0. The corresponding fact about usb_submit_urb() for the > host-side API has long been