Re: [PATCH 12/21] usb: chipidea: msm: Keep device runtime enabled

2016-06-30 Thread Peter Chen
On Thu, Jun 30, 2016 at 01:30:54PM -0700, Stephen Boyd wrote: > Quoting Peter Chen (2016-06-29 18:39:01) > > On Wed, Jun 29, 2016 at 05:43:30PM -0700, Stephen Boyd wrote: > > > Quoting Peter Chen (2016-06-28 23:46:00) > > > > On Sun, Jun 26, 2016 at 12:28:29AM -0700, Stephen Boyd wrote: > > > > >

Re: [PATCH v5 4/5] usb: dwc3: add dis_del_phy_power_chg_quirk

2016-06-30 Thread Rob Herring
On Thu, Jun 30, 2016 at 07:12:55PM +0800, William Wu wrote: > Add a quirk to clear the GUSB3PIPECTL.DELAYP1TRANS bit, > which specifies whether disable delay PHY power change > from P0 to P1/P2/P3 when link state changing from U0 > to U1/U2/U3 respectively. > > Signed-off-by: William Wu

Re: [PATCH v5 4/5] usb: dwc3: add dis_del_phy_power_chg_quirk[Involving remittance information, please pay attention to the safety of property]

2016-06-30 Thread William Wu
Dear Rob, On 07/01/2016 10:38 AM, Rob Herring wrote: On Thu, Jun 30, 2016 at 07:12:55PM +0800, William Wu wrote: Add a quirk to clear the GUSB3PIPECTL.DELAYP1TRANS bit, which specifies whether disable delay PHY power change from P0 to P1/P2/P3 when link state changing from U0 to U1/U2/U3

Re: [PATCH v5 2/5] usb: dwc3: add dis_u2_freeclk_exists_quirk[Involving remittance information, please pay attention to the safety of property]

2016-06-30 Thread William Wu
Dear Rob, On 07/01/2016 10:32 AM, Rob Herring wrote: On Thu, Jun 30, 2016 at 07:12:53PM +0800, William Wu wrote: Add a quirk to clear the GUSB2PHYCFG.U2_FREECLK_EXISTS bit, which specifies whether the USB2.0 PHY provides a free-running PHY clock, which is active when the clock control input is

Re: [PATCH v5 3/5] usb: dwc3: add phyif_utmi_quirk

2016-06-30 Thread Rob Herring
On Thu, Jun 30, 2016 at 07:12:54PM +0800, William Wu wrote: > Add a quirk to configure the core to support the > UTMI+ PHY with an 8- or 16-bit interface. UTMI+ PHY > interface is hardware property, and it's platform > dependent. Normall, the PHYIf can be configured > during coreconsultant. But

Re: [PATCH v5 2/5] usb: dwc3: add dis_u2_freeclk_exists_quirk

2016-06-30 Thread Rob Herring
On Thu, Jun 30, 2016 at 07:12:53PM +0800, William Wu wrote: > Add a quirk to clear the GUSB2PHYCFG.U2_FREECLK_EXISTS bit, > which specifies whether the USB2.0 PHY provides a free-running > PHY clock, which is active when the clock control input is active. > > Signed-off-by: William Wu

[GIT PULL] usb: chipidea changes for v4.8-rc1

2016-06-30 Thread Peter Chen
The following changes since commit aa5e94a2e13377e374795de5400e346c978f46be: Revert "usb: ohci-at91: Forcibly suspend ports while USB suspend" (2016-06-20 07:42:07 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git/

Re: [PATCH v5 5/5] usb: dwc3: rockchip: add devicetree bindings documentation

2016-06-30 Thread William Wu
Dear Heiko, On 06/30/2016 08:15 PM, Heiko Stuebner wrote: Hi William, Am Donnerstag, 30. Juni 2016, 19:16:40 schrieb William Wu: This patch adds the devicetree documentation required for Rockchip USB3.0 core wrapper consisting of USB3.0 IP from Synopsys. It supports DRD mode, and could

Re: [PATCH 02/21] usb: ulpi: Support device discovery via DT

2016-06-30 Thread Rob Herring
On Tue, Jun 28, 2016 at 03:09:21PM -0700, Stephen Boyd wrote: > Quoting Rob Herring (2016-06-28 13:56:42) > > On Sun, Jun 26, 2016 at 12:28:19AM -0700, Stephen Boyd wrote: > > > The qcom HSIC ulpi phy doesn't have any bits set in the vendor or > > > product id ulpi registers. This makes it

Re: [PATCHv4 1/2] usb: USB Type-C connector class

2016-06-30 Thread Guenter Roeck
On Wed, Jun 29, 2016 at 04:38:37PM +0300, Heikki Krogerus wrote: > The purpose of USB Type-C connector class is to provide > unified interface for the user space to get the status and > basic information about USB Type-C connectors on a system, > control over data role swapping, and when the port

Re: [GIT PULL] usb patches for v4.8

2016-06-30 Thread Greg Kroah-Hartman
On Thu, Jun 30, 2016 at 02:00:40PM +0300, Roger Quadros wrote: > Greg, Felipe, > > On 30/06/16 13:45, Roger Quadros wrote: > > On 30/06/16 13:32, Felipe Balbi wrote: > >> > >> Hi, > >> > >> Roger Quadros writes: > >> here's the big pull request for gadget API and related UDC

[PATCH 07/12] usb: musb: gadget: add usb-request tracepoints

2016-06-30 Thread Bin Liu
Add usb_request tracepoints for gadget mode. Signed-off-by: Bin Liu --- drivers/usb/musb/musb_gadget.c | 35 --- drivers/usb/musb/musb_trace.h | 76 ++ 2 files changed, 90 insertions(+), 21 deletions(-) diff --git

[PATCH 11/12] usb: musb: sunxi: make unexported symbols static

2016-06-30 Thread Bin Liu
From: Ben Dooks The sunxi_musb_dma_controller_create and _destroy are not exported or used outside the driver, so fix sparse warnings by making these two static: drivers/usb/musb/sunxi.c:357:23: warning: symbol 'sunxi_musb_dma_controller_create' was not declared.

[PATCH 10/12] usb: musb: cppi41: add dma channel tracepoints

2016-06-30 Thread Bin Liu
Add tracepoints for cppi41 dma channels. Signed-off-by: Bin Liu --- drivers/usb/musb/musb_cppi41.c | 22 ++--- drivers/usb/musb/musb_trace.h | 70 ++ 2 files changed, 80 insertions(+), 12 deletions(-) diff --git

[PATCH 09/12] usb: musb: cppi41: move struct cppi41_dma_channel to header

2016-06-30 Thread Bin Liu
Move struct cppi41_dma_channel to the header file so other modules can use it. Signed-off-by: Bin Liu --- drivers/usb/musb/cppi_dma.h| 23 ++- drivers/usb/musb/musb_cppi41.c | 21 + 2 files changed, 23 insertions(+), 21 deletions(-)

[PATCH 12/12] usb: musb: sunxi: Simplify dr_mode handling

2016-06-30 Thread Bin Liu
From: Hans de Goede phy-sun4i-usb now has proper dr_mode handling, it always registers an extcon, and sends a notify with the mode (even when in peripheral- / host-only mode) at least once. So we can simply the sunxi musb glue by always registering its extcon notifier and

[PATCH 08/12] usb: musb: cleanup cppi_dma header

2016-06-30 Thread Bin Liu
davinci.h is not required by cppi_dma.h but cppi_dma.c, so move the include to the right place. Signed-off-by: Bin Liu --- drivers/usb/musb/cppi_dma.c | 1 + drivers/usb/musb/cppi_dma.h | 8 2 files changed, 1 insertion(+), 8 deletions(-) diff --git

[PATCH 04/12] usb: musb: add tracepoints for register access

2016-06-30 Thread Bin Liu
This adds tracepoints to musb register read/write wrappers to get trace log for register access. The default tacepoint log prefix here would be musb_readX/writeX(), which is not much helpful. So this patch let the tracepoints use __buildin_return_address(0) to print the caller funciton name to

[PATCH 06/12] usb: musb: host: add urb tracepoints

2016-06-30 Thread Bin Liu
Add urb tracepoints for host mode. Signed-off-by: Bin Liu --- drivers/usb/musb/musb_host.c | 34 ++- drivers/usb/musb/musb_trace.h | 63 +++ 2 files changed, 71 insertions(+), 26 deletions(-) diff --git

[PATCH v2 00/12] musb patches for v4.8-rc1

2016-06-30 Thread Bin Liu
Hi Greg, This musb patch set is for next v4.8. It adds tracepoints to musb drivers to help debugging. This v2 is rebased on v4.7-rc4, to solve a merge conflict, and adds two more patches for musb sunxi glue layer. Please let me know if any change is needed. Regards, -Bin. --- Ben Dooks (1):

[PATCH v2 02/12] usb: musb: switch dev_dbg to tracepoints

2016-06-30 Thread Bin Liu
Switch dev_dbg() to tracepoint debug musb_dbg(). Signed-off-by: Bin Liu --- drivers/usb/musb/cppi_dma.c| 50 + drivers/usb/musb/musb_core.c | 64 +++--- drivers/usb/musb/musb_cppi41.c | 12 ++--- drivers/usb/musb/musb_gadget.c

[PATCH 03/12] usb: musb: dsps: use musb register read/write wrappers instead

2016-06-30 Thread Bin Liu
musb core already exports the register read/write wrappers, so clean up the duplication in dsps glue. Signed-off-by: Bin Liu --- drivers/usb/musb/musb_dsps.c | 112 +-- 1 file changed, 44 insertions(+), 68 deletions(-) diff --git

[PATCH 01/12] usb: musb: add tracepoints support for debugging

2016-06-30 Thread Bin Liu
To avoid printk() overhead while debugging, this patch implements the foundation of tracepoints logging for musb driver to make debug easier. Signed-off-by: Bin Liu --- drivers/usb/musb/Makefile | 5 +++- drivers/usb/musb/musb_debug.h | 2 ++ drivers/usb/musb/musb_trace.c |

[PATCH 05/12] usb: musb: add tracepoints to dump interrupt events

2016-06-30 Thread Bin Liu
This adds tracepoints to dump musb interrupt events. Signed-off-by: Bin Liu --- drivers/usb/musb/musb_core.c | 4 +--- drivers/usb/musb/musb_trace.h | 21 + 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/drivers/usb/musb/musb_core.c

Re: [PATCHv4 1/2] usb: USB Type-C connector class

2016-06-30 Thread Guenter Roeck
On Wed, Jun 29, 2016 at 04:38:37PM +0300, Heikki Krogerus wrote: > The purpose of USB Type-C connector class is to provide > unified interface for the user space to get the status and > basic information about USB Type-C connectors on a system, > control over data role swapping, and when the port

Re: [PATCH 16/21] usb: chipidea: msm: Restore wrapper settings after reset

2016-06-30 Thread Stephen Boyd
On 30 June 2016 at 01:54, Peter Chen wrote: > On Wed, Jun 29, 2016 at 12:13:45PM -0700, Stephen Boyd wrote: >> Quoting Peter Chen (2016-06-29 01:26:48 >> > Why not using ci->platdata->vbus_extcon directly? >> >> Because ci->platdata->vbus_extcon is assigned after the child

Re: [PATCH] xhci: free the correct ring

2016-06-30 Thread Mathias Nyman
On 30.06.2016 15:26, Arnd Bergmann wrote: gcc warns about what first looks like a reference to an uninitialized variable: drivers/usb/host/xhci-ring.c: In function 'handle_cmd_completion': drivers/usb/host/xhci-ring.c:753:4: error: 'ep_ring' may be used uninitialized in this function

Re: [PATCH 3/3] dt-bindings: Document the STM32 USB OTG DWC2 core binding

2016-06-30 Thread Rob Herring
On Wed, Jun 29, 2016 at 03:56:23PM -0300, Bruno Herrera wrote: > On Tue, Jun 28, 2016 at 5:54 PM, Rob Herring wrote: > > On Fri, Jun 24, 2016 at 03:51:18PM -0300, Bruno Herrera wrote: > >> On Fri, Jun 24, 2016 at 12:41 PM, Rob Herring wrote: > >> > On Tue, Jun

Re: [PATCH] usb: host: Allow EHCI_OMAP to be built-in when USB_GADGET is 'm'

2016-06-30 Thread Roger Quadros
Hi Felipe, On 30/06/16 13:14, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >> NOP_USB_XCEIV is used not only by gadget drivers but by >> host drivers as well e.g. EHCI_OMAP. >> >> commit 5a8d651a2bde ("usb: gadget: move gadget API functions to udc-core") >> made it so

[PATCH] xhci: free the correct ring

2016-06-30 Thread Arnd Bergmann
gcc warns about what first looks like a reference to an uninitialized variable: drivers/usb/host/xhci-ring.c: In function 'handle_cmd_completion': drivers/usb/host/xhci-ring.c:753:4: error: 'ep_ring' may be used uninitialized in this function [-Werror=maybe-uninitialized]

Re: [PATCH v5 5/5] usb: dwc3: rockchip: add devicetree bindings documentation

2016-06-30 Thread Heiko Stuebner
Hi William, Am Donnerstag, 30. Juni 2016, 19:16:40 schrieb William Wu: > This patch adds the devicetree documentation required for Rockchip > USB3.0 core wrapper consisting of USB3.0 IP from Synopsys. > > It supports DRD mode, and could operate in device mode (SS, HS, FS) > and host mode (SS,

Re: [PATCH] usb: dwc3: host: Fix broken XHCI host

2016-06-30 Thread Felipe Balbi
Hi, Roger Quadros writes: > Looks like we lost all changes related to > commit 9522def40065 ("usb: dwc3: core: cleanup IRQ resources") in host.c > when Felipe's next branch was merged into Greg's next branch. > > Fixes 215db948181 ("Merge tag 'usb-for-v4.8' of >

[PATCH] usb: dwc3: host: Fix broken XHCI host

2016-06-30 Thread Roger Quadros
Looks like we lost all changes related to commit 9522def40065 ("usb: dwc3: core: cleanup IRQ resources") in host.c when Felipe's next branch was merged into Greg's next branch. Fixes 215db948181 ("Merge tag 'usb-for-v4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next")

Re: [GIT PULL] usb patches for v4.8

2016-06-30 Thread Felipe Balbi
Hi, Roger Quadros writes: >>> Roger Quadros writes: >>> here's the big pull request for gadget API and related UDC drivers. >>> >>> Nothing really scary lately. Patches have been in linux-next for a while >>> without outstanding reports. >>>

[PATCH v5 5/5] usb: dwc3: rockchip: add devicetree bindings documentation

2016-06-30 Thread William Wu
This patch adds the devicetree documentation required for Rockchip USB3.0 core wrapper consisting of USB3.0 IP from Synopsys. It supports DRD mode, and could operate in device mode (SS, HS, FS) and host mode (SS, HS, FS, LS). Signed-off-by: William Wu --- Changes in

[PATCH v5 0/5] support rockchip dwc3 driver

2016-06-30 Thread William Wu
This series add support for rockchip dwc3 driver, and add additional optional properties for specific platforms (e.g., rockchip rk3399 platform). William Wu (5): usb: dwc3: of-simple: add compatible for rockchip rk3399 usb: dwc3: add dis_u2_freeclk_exists_quirk usb: dwc3: add

[PATCH v5 1/5] usb: dwc3: of-simple: add compatible for rockchip rk3399

2016-06-30 Thread William Wu
Rockchip platform merely enable usb3 clocks and populate its children. So we can use this generic glue layer to support Rockchip dwc3. Signed-off-by: William Wu --- Changes in v5: - change compatible from "rockchip,dwc3" to "rockchip,rk3399-dwc3" (Heiko) Changes in

[PATCH v5 4/5] usb: dwc3: add dis_del_phy_power_chg_quirk

2016-06-30 Thread William Wu
Add a quirk to clear the GUSB3PIPECTL.DELAYP1TRANS bit, which specifies whether disable delay PHY power change from P0 to P1/P2/P3 when link state changing from U0 to U1/U2/U3 respectively. Signed-off-by: William Wu --- Changes in v5: - None Changes in v4: - rebase on

[PATCH v5 2/5] usb: dwc3: add dis_u2_freeclk_exists_quirk

2016-06-30 Thread William Wu
Add a quirk to clear the GUSB2PHYCFG.U2_FREECLK_EXISTS bit, which specifies whether the USB2.0 PHY provides a free-running PHY clock, which is active when the clock control input is active. Signed-off-by: William Wu --- Changes in v5: - None Changes in v4: - rebase on

[PATCH v5 3/5] usb: dwc3: add phyif_utmi_quirk

2016-06-30 Thread William Wu
Add a quirk to configure the core to support the UTMI+ PHY with an 8- or 16-bit interface. UTMI+ PHY interface is hardware property, and it's platform dependent. Normall, the PHYIf can be configured during coreconsultant. But for some specific usb cores(e.g. rk3399 soc dwc3), the default PHYIf

Re: [PATCH v14 1/4] usb: gadget: Introduce the usb charger framework

2016-06-30 Thread Baolin Wang
Hi Felipe, On 30 June 2016 at 18:30, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >> +static ssize_t charger_state_show(struct device *dev, >> + struct device_attribute *attr, >> + char

Re: [GIT PULL] usb patches for v4.8

2016-06-30 Thread Roger Quadros
Greg, Felipe, On 30/06/16 13:45, Roger Quadros wrote: > On 30/06/16 13:32, Felipe Balbi wrote: >> >> Hi, >> >> Roger Quadros writes: >> here's the big pull request for gadget API and related UDC drivers. >> >> Nothing really scary lately. Patches have been in

Re: [GIT PULL] usb patches for v4.8

2016-06-30 Thread Roger Quadros
On 30/06/16 13:32, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: > here's the big pull request for gadget API and related UDC drivers. > > Nothing really scary lately. Patches have been in linux-next for a while > without outstanding reports. > >

Re: [GIT PULL] usb patches for v4.8

2016-06-30 Thread Felipe Balbi
Hi, Roger Quadros writes: here's the big pull request for gadget API and related UDC drivers. Nothing really scary lately. Patches have been in linux-next for a while without outstanding reports. Let me know if you want any changes, but things seem

Re: [PATCH v14 1/4] usb: gadget: Introduce the usb charger framework

2016-06-30 Thread Felipe Balbi
Hi, Baolin Wang writes: > +static ssize_t charger_state_show(struct device *dev, > + struct device_attribute *attr, > + char *buf) > +{ > + struct usb_charger *uchger = dev_to_uchger(dev); > + int cnt; >

Re: [GIT PULL] usb patches for v4.8

2016-06-30 Thread Roger Quadros
On 30/06/16 13:04, Felipe Balbi wrote: > > Hi, > > Greg Kroah-Hartman writes: >> On Wed, Jun 29, 2016 at 04:11:31PM +0300, Felipe Balbi wrote: >>> >>> Hi Greg, >>> >>> here's the big pull request for gadget API and related UDC drivers. >>> >>> Nothing really scary

Re: [PATCH] usb: host: Allow EHCI_OMAP to be built-in when USB_GADGET is 'm'

2016-06-30 Thread Felipe Balbi
Hi, Roger Quadros writes: > NOP_USB_XCEIV is used not only by gadget drivers but by > host drivers as well e.g. EHCI_OMAP. > > commit 5a8d651a2bde ("usb: gadget: move gadget API functions to udc-core") > made it so that NOP_USB_XCEIV can't be built-in if USB_GADGET is 'm'. > But

Re: [GIT PULL] usb patches for v4.8

2016-06-30 Thread Felipe Balbi
Hi, Greg Kroah-Hartman writes: > On Wed, Jun 29, 2016 at 04:11:31PM +0300, Felipe Balbi wrote: >> >> Hi Greg, >> >> here's the big pull request for gadget API and related UDC drivers. >> >> Nothing really scary lately. Patches have been in linux-next for a while

Re: [PATCH RFC 0/4] Improvements to Chipidea UDC

2016-06-30 Thread Peter Chen
On Sat, Jun 25, 2016 at 08:38:55AM +, Stefan Wahren wrote: > This patch series aim to improve the ChipIdea UDC driver in regards to > readability and runtime behavior. > > Stefan Wahren (4): > usb: chipidea: udc: move write barrier into hw_ep_prime > usb: chipidea: udc: Don't flush

Re: [PATCH RFC 3/4] usb: chipidea: udc: Avoid busy wait in reset ISR

2016-06-30 Thread Peter Chen
On Sat, Jun 25, 2016 at 08:38:58AM +, Stefan Wahren wrote: > Since there is no dependency from this busy wait in the reset ISR > we could remove it. > > Signed-off-by: Stefan Wahren > --- > drivers/usb/chipidea/udc.c |4 > 1 file changed, 4 deletions(-) > >

Re: [PATCH] usb: otg-fsm: Cancel HNP polling work when not used

2016-06-30 Thread Peter Chen
On Wed, Jun 29, 2016 at 07:02:32PM -0700, Stephen Boyd wrote: > Quoting Peter Chen (2016-06-29 02:43:47) > > On Mon, Jun 27, 2016 at 06:18:27PM -0700, Stephen Boyd wrote: > > It introduces circular locking after applying it, otg_statemachine calls > > otg_leave_state, and otg_leave_state calls

Re: [PATCH 17/21] usb: chipidea: msm: Make platform data driver local instead of global

2016-06-30 Thread Peter Chen
On Wed, Jun 29, 2016 at 12:17:12PM -0700, Stephen Boyd wrote: > Quoting Peter Chen (2016-06-29 04:29:25) > > On Sun, Jun 26, 2016 at 12:28:34AM -0700, Stephen Boyd wrote: > > > @@ -204,7 +201,7 @@ static int ci_hdrc_msm_probe(struct platform_device > > > *pdev) > > > of_node_put(ulpi_node);

[PATCH] usb: gadget: Add the gserial port checking in gs_start_tx()

2016-06-30 Thread Baolin Wang
When usb gadget is set gadget serial function, it will be crash in below situation. It will clean the 'port->port_usb' pointer in gserial_disconnect() function when usb link is inactive, but it will release lock for disabling the endpoints in this function. Druing the lock release period, it

Re: [PATCH 16/21] usb: chipidea: msm: Restore wrapper settings after reset

2016-06-30 Thread Peter Chen
On Wed, Jun 29, 2016 at 12:13:45PM -0700, Stephen Boyd wrote: > Quoting Peter Chen (2016-06-29 01:26:48) > > On Sun, Jun 26, 2016 at 12:28:33AM -0700, Stephen Boyd wrote: > > > When the RESET bit is set in the USBCMD register it resets quite > > > @@ -21,11 +23,22 @@ > > > #define HS_PHY_SEC_CTRL

RE: [PATCH 3/3] usb: renesas_usbhs: Use devm_usb_get_phy_by_phandle()

2016-06-30 Thread Yoshihiro Shimoda
Hi, > From: Rob Herring > Sent: Wednesday, June 29, 2016 5:57 AM > > On Mon, Jun 27, 2016 at 09:09:19PM +0900, Yoshihiro Shimoda wrote: > > This patch uses devm_usb_get_phy_by_phandle() instead of usb_get_phy() > > for device tree environment. This change is not compabile with the > > previous

[PATCH] usb: host: Allow EHCI_OMAP to be built-in when USB_GADGET is 'm'

2016-06-30 Thread Roger Quadros
NOP_USB_XCEIV is used not only by gadget drivers but by host drivers as well e.g. EHCI_OMAP. commit 5a8d651a2bde ("usb: gadget: move gadget API functions to udc-core") made it so that NOP_USB_XCEIV can't be built-in if USB_GADGET is 'm'. But this prevents EHCI_OMAP to be built-in if USB_GADGET is

[PATCH net] r8152: clear LINK_OFF_WAKE_EN after autoresume

2016-06-30 Thread Hayes Wang
LINK_OFF_WAKE_EN should be cleared after autoresume, otherwise after system suspend, the system would wake up when linking off occurs. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 11 +++ 1 file changed, 11 insertions(+) diff --git