Re: [PATCH v2 06/22] usb: chipidea: Add platform flag for wrapper phy management

2016-07-08 Thread Peter Chen
ny phy power management in the > core layer, leaving it up to the glue driver to manage. > > Cc: Peter Chen <peter.c...@nxp.com> > Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> > Signed-off-by: Stephen Boyd <stephen.b...@linaro.org> > --- > drivers/u

Re: [PATCH v2 04/22] usb: chipidea: Only read/write OTGSC from one place

2016-07-08 Thread Peter Chen
g() function to the only place it's used and > simplify it for polling the OTGSC register. Then we can make > certain we only use the hw_read_otgsc() API to read OTGSC, which > will make sure we properly handle extcon events. > > Cc: Peter Chen <peter.c...@nxp.com&

Re: [PATCH v2 03/22] usb: ulpi: Support device discovery via device properties

2016-07-08 Thread Peter Chen
t;, > +>id.vendor); > + ret |= device_property_read_u16(>dev, "ulpi-product", > + >id.product); > + if (ret) { > + ret = ulpi_read_id(ulpi); > + if (ret) > +

[PATCH 2/2] usb: Kconfig: move ulpi bus to common

2016-07-08 Thread Peter Chen
The ULPI bus is not only for host, but for device mode too, so move it out from host's Kconfig. Cc: Heikki Krogerus <heikki.kroge...@linux.intel.com> Signed-off-by: Peter Chen <peter.c...@nxp.com> --- drivers/usb/common/Kconfig | 21 + drivers/usb/core/Kc

[PATCH 1/2] usb: Kconfig: move common things under usb/common

2016-07-08 Thread Peter Chen
It can simplify root Kconfig Signed-off-by: Peter Chen <peter.c...@nxp.com> --- drivers/usb/Kconfig| 10 +- drivers/usb/common/Kconfig | 9 + 2 files changed, 10 insertions(+), 9 deletions(-) create mode 100644 drivers/usb/common/Kconfig diff --git a/drive

[PATCH 1/1] usb: udc: core: fix error handling

2016-07-08 Thread Peter Chen
The udc device needs to be deleted if error occurs Fixes: 855ed04a (usb: gadget: udc-core: independent registration of gadgets and gadget drivers) Signed-off-by: Peter Chen <peter.c...@nxp.com> --- drivers/usb/gadget/udc/core.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-)

Re: [PATCH v2 1/2] usb: gadget: legacy: Add udc module param to all legacy gadgets

2016-07-08 Thread Peter Chen
@strings: tables of strings, keyed by identifiers assigned during @bind > @@ -379,6 +380,7 @@ enum { > */ > struct usb_composite_driver { > const char *name; > + char *udc_name; > const struct usb_de

Re: [PATCH 1/6] binding-doc: power: pwrseq-generic: add binding doc for generic power sequence library

2016-07-07 Thread Peter Chen
On Thu, Jul 07, 2016 at 04:53:07PM -0700, Joshua Clayton wrote: > > > On 07/07/2016 02:47 AM, Philipp Zabel wrote: > > Am Donnerstag, den 07.07.2016, 17:14 +0800 schrieb Peter Chen: > >> Add binding doc for generic power sequence library. > >> > >> Sig

Re: [PATCH 1/6] binding-doc: power: pwrseq-generic: add binding doc for generic power sequence library

2016-07-07 Thread Peter Chen
On Thu, Jul 07, 2016 at 11:47:14AM +0200, Philipp Zabel wrote: > Am Donnerstag, den 07.07.2016, 17:14 +0800 schrieb Peter Chen: > > Add binding doc for generic power sequence library. > > > > Signed-off-by: Peter Chen <peter.c...@nxp.com> > > --- > > .../b

Re: [PATCH 5/6] usb: chipidea: host: let the hcd know's parent device node

2016-07-07 Thread Peter Chen
On Thu, Jul 07, 2016 at 03:56:51PM -0700, Stephen Boyd wrote: > Quoting Peter Chen (2016-07-07 02:14:51) > > diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c > > index 053bac9..55120ef 100644 > > --- a/drivers/usb/chipidea/host.c > > +++ b/

[PATCH 0/6] power: add power sequence library

2016-07-07 Thread Peter Chen
-usb/msg142755.html [2] http://www.spinics.net/lists/linux-usb/msg143106.html [3] http://www.spinics.net/lists/linux-usb/msg142815.html Peter Chen (6): binding-doc: power: pwrseq-generic: add binding doc for generic power sequence library power: add power sequence library binding-doc: usb

[PATCH 3/6] binding-doc: usb: usb-device: add optional properties for power sequence

2016-07-07 Thread Peter Chen
Add optional properties for power sequence. Signed-off-by: Peter Chen <peter.c...@nxp.com> --- Documentation/devicetree/bindings/usb/usb-device.txt | 10 ++ 1 file changed, 10 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/usb-device.txt b/Documentation/devi

[PATCH 4/6] usb: core: add power sequence handling for USB devices

2016-07-07 Thread Peter Chen
) if this device is described at dts and there is a property "power-sequence" for it. At hub_disconnect, it will do power off sequence which is at powered on list. Signed-off-by: Peter Chen <peter.c...@nxp.com> --- drivers/usb/core/Makefile | 1 + drivers/usb/core/hub.c| 12

[PATCH 2/6] power: add power sequence library

2016-07-07 Thread Peter Chen
and clocks currently, and can cover regulator and pinctrl in future. The host driver calls pwrseq_alloc_generic to create an generic pwrseq instance. Signed-off-by: Peter Chen <peter.c...@nxp.com> --- drivers/power/Kconfig | 1 + drivers/power/Makefile

[PATCH 6/6] ARM: dts: imx6qdl-udoo.dtsi: fix onboard USB HUB property

2016-07-07 Thread Peter Chen
From: Peter Chen <peter.c...@freescale.com> The current dts describes USB HUB's property at USB controller's entry, it is improper. The USB HUB should be the child node under USB controller, and power sequence properties are under it. Signed-off-by: Peter Chen <peter.c...@freescale.co

Re: [PATCH 1/1] usb: core: of.c: fix defined but not declare warning

2016-07-07 Thread Peter Chen
On Wed, Jun 15, 2016 at 11:25:43AM +0800, Peter Chen wrote: > The helper usb_of_get_child_node is defined at of.c, but missing its > declare as a global function. Fix it by adding related header file > as well as compile it on conditional of CONFIG_OF. > > Cc: Greg Kro

[PATCH 1/6] binding-doc: power: pwrseq-generic: add binding doc for generic power sequence library

2016-07-07 Thread Peter Chen
Add binding doc for generic power sequence library. Signed-off-by: Peter Chen <peter.c...@nxp.com> --- .../bindings/power/pwrseq/pwrseq-generic.txt | 56 ++ 1 file changed, 56 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/pwrseq/

[PATCH 5/6] usb: chipidea: host: let the hcd know's parent device node

2016-07-07 Thread Peter Chen
From: Peter Chen <peter.c...@freescale.com> Since the hcd (chipidea core device) has no device node, so if we want to describe the child node under the hcd, we had to put it under its parent's node (glue layer device), and in the code, we need to let the hcd knows glue layer's code, then t

Re: next-20160705 build: 2 failures 6 warnings (next-20160705)

2016-07-05 Thread Peter Chen
On Wed, Jul 06, 2016 at 10:31:56AM +0800, Peter Chen wrote: > On Tue, Jul 05, 2016 at 11:52:42AM +0200, Mark Brown wrote: > > On Tue, Jul 05, 2016 at 10:15:03AM +0100, Build bot for Mark Brown wrote: > > > > For the past little while both arm and arm64 allmodconfig builds

Re: next-20160705 build: 2 failures 6 warnings (next-20160705)

2016-07-05 Thread Peter Chen
n USB_GADGET. Commit 5a8d651a2 "usb: gadget: move gadget API functions to udc-core" moves gadget APIs definitions from .h to .c causes this build error, but this change is worthwhile. The udc driver (emxx) should can be built as module too. Below patch should fix it: >From 414926524

[PATCH 2/3] usb: gadget: u_ether: fix dereference after null check coverify warning

2016-07-01 Thread Peter Chen
dev->port_usb is checked for null pointer at above code, so dev->port_usb might be null, fix it by adding null pointer check. Signed-off-by: Peter Chen <peter.c...@nxp.com> --- drivers/usb/gadget/function/u_ether.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a

[PATCH 1/3] usb: gadget: composite: fix dereference after null check coverify warning

2016-07-01 Thread Peter Chen
cdev->config is checked for null pointer at above code, so cdev->config might be null, fix it by adding null pointer check. Signed-off-by: Peter Chen <peter.c...@nxp.com> --- drivers/usb/gadget/composite.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/gadget/c

[PATCH 3/3] usb: gadget: u_ether: fix dereference after null check coverify warning

2016-07-01 Thread Peter Chen
skb is checked for null pointer at above code, so skb might be null. eem_wrap uses it without checking null pointer, fix it by adding null pointer check. Signed-off-by: Peter Chen <peter.c...@nxp.com> --- drivers/usb/gadget/function/u_ether.c | 2 +- 1 file changed, 1 insertion(+), 1 de

[PATCH 0/3] usb: gadget: fix several coverity warnings

2016-07-01 Thread Peter Chen
Hi Felipe, Below three patches are fixes for warning which are found during coverity code scan, all for dereference after null pointer check. Peter Chen (3): usb: gadget: composite: fix dereference after null check coverify warning usb: gadget: u_ether: fix dereference after null check

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:

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

2016-06-30 Thread Peter Chen
-rc1, none is important, only the documentation update for chipidea. Jisheng Zhang (1): dt-bindings: ci-hdrc-usb2: s/gadget-itc-setting/itc-setting in example Peter Chen (1): usb: chipidea: Kconfig: improve Kconfig

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

2016-06-30 Thread Peter Chen
patch 3/4, others are ok. -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

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

2016-06-30 Thread Peter Chen
/* clear complete status */ > hw_write(ci, OP_ENDPTCOMPLETE, 0, 0); > > - /* wait until all bits cleared */ > - while (hw_read(ci, OP_ENDPTPRIME, ~0)) > - udelay(10); /* not RTOS friendly */ > - I think this wait is needed, you can add

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

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) > &

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 @@ >

Re: [PATCH 15/21] usb: chipidea: msm: Mux over secondary phy at the right time

2016-06-29 Thread Peter Chen
On Wed, Jun 29, 2016 at 12:28:58PM -0700, Stephen Boyd wrote: > Quoting Peter Chen (2016-06-29 01:08:52) > > On Sun, Jun 26, 2016 at 12:28:32AM -0700, Stephen Boyd wrote: > > > We need to pick the correct phy at runtime based on how the SoC > > > has been wired onto the

Re: [PATCH 13/21] usb: chipidea: msm: Allow core to get usb phy

2016-06-29 Thread Peter Chen
On Wed, Jun 29, 2016 at 12:31:18PM -0700, Stephen Boyd wrote: > Quoting Peter Chen (2016-06-29 04:34:11) > > On Wed, Jun 29, 2016 at 02:48:11PM +0800, Peter Chen wrote: > > > On Sun, Jun 26, 2016 at 12:28:30AM -0700, Stephen Boyd wrote: > > > > @@

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

2016-06-29 Thread Peter Chen
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: > > > Sometimes the usb wrapper device is part of a power domain that > > > needs to stay on as l

Re: [PATCH 08/21] usb: chipidea: Kick OTG state machine for AVVIS with vbus extcon

2016-06-29 Thread Peter Chen
On Wed, Jun 29, 2016 at 06:19:59PM -0700, Stephen Boyd wrote: > Quoting Peter Chen (2016-06-28 20:09:13) > > On Sun, Jun 26, 2016 at 12:28:25AM -0700, Stephen Boyd wrote: > > > Force the OTG state machine to go forward when we're using an > > > extcon for v

Re: [PATCH 06/21] usb: chipidea: Initialize and reinitialize phy later

2016-06-29 Thread Peter Chen
On Wed, Jun 29, 2016 at 06:23:50PM -0700, Stephen Boyd wrote: > Quoting Peter Chen (2016-06-28 19:30:52) > > On Sun, Jun 26, 2016 at 12:28:23AM -0700, Stephen Boyd wrote: > > > The ULPI phy on qcom platforms needs to be initialized and > > > powered on after a USB

Re: [PATCH 19/21] usb: chipidea: msm: Be silent on probe defer errors

2016-06-29 Thread Peter Chen
On Sun, Jun 26, 2016 at 12:28:36AM -0700, Stephen Boyd wrote: > If something fails in ci_hdrc_add_device() due to probe defer, we > shouldn't print an error message. Be silent in this case as we'll > try probe again later. > > Cc: Peter Chen <peter.c...@nxp.com> > Cc:

Re: [PATCH 10/21] usb: chipidea: msm: Rely on core to override AHBBURST

2016-06-29 Thread Peter Chen
On Wed, Jun 29, 2016 at 11:59:21AM -0700, Stephen Boyd wrote: > Quoting Peter Chen (2016-06-28 23:32:11) > > On Sun, Jun 26, 2016 at 12:28:27AM -0700, Stephen Boyd wrote: > > > The core framework already handles setting this parameter with a > > > platform quirk.

Re: [PATCH 18/21] usb: chipidea: msm: Add reset controller for PHY POR bit

2016-06-29 Thread Peter Chen
time during initialization. > > Cc: Peter Chen <peter.c...@nxp.com> > Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> > Signed-off-by: Stephen Boyd <stephen.b...@linaro.org> > --- > drivers/usb/chipidea/ci_hdrc_msm.c | 43 > +++

Re: [PATCH 13/21] usb: chipidea: msm: Allow core to get usb phy

2016-06-29 Thread Peter Chen
On Wed, Jun 29, 2016 at 02:48:11PM +0800, Peter Chen wrote: > On Sun, Jun 26, 2016 at 12:28:30AM -0700, Stephen Boyd wrote: > > The chipidea core gets the usb phy and initializes the phy at the > > right point now so we don't need to get the phy in this driver. > > > &

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

2016-06-29 Thread Peter Chen
an OTG type chipidea controller and > another is a host. Let's create a copy of this structure per each > device instance so that odd things don't happen. > > Cc: Peter Chen <peter.c...@nxp.com> > Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> > Signed-off

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

2016-06-29 Thread Peter Chen
;8016ff1c>] (lock_acquire) from [<80947c18>] > > (mutex_lock_nested+0x54/0x3ec) > > [ 183.455864] r7:bdb7bc00 r6:8174e47c r5:806118dc r4: > > [ 183.461645] [<80947bc4>] (mutex_lock_nested) from [<806118dc>] > > (otg_statemachine+0x20/0x470) [

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

2016-06-29 Thread Peter Chen
5:bdb701cc [ 183.478057] r4:bdb70120 [ 183.480641] [<806118bc>] (otg_statemachine) from [<80611df4>] (otg_hnp_polling_work+0xc8/0x1a4) [ 183.489354] r5:bdb70214 r4: [ 183.493006] [<80611d2c>] (otg_hnp_polling_work) from [<801403d4>] (process_one_work+0x19

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

2016-06-29 Thread Peter Chen
and ehci-msm drivers writing into the > controller wrapper's MMIO address space. Let's consolidate the > register writes into the wrapper driver instead so that we > clearly split the wrapper from the phys. > > Cc: Peter Chen <peter.c...@nxp.com> > Cc: Greg Kroah-Hartman <g

Re: [PATCH 15/21] usb: chipidea: msm: Mux over secondary phy at the right time

2016-06-29 Thread Peter Chen
e sure to do this on reset too, because this > register is reset to the default value (primary phy) after the > RESET bit is set in USBCMD. > I am curious when you need the secondary phy? > Cc: Peter Chen <peter.c...@nxp.com> > Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> &

Re: [PATCH 14/21] usb: chipidea: msm: Add proper clk and reset support

2016-06-29 Thread Peter Chen
must turn it on here. > > Cc: Peter Chen <peter.c...@nxp.com> > Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> > Signed-off-by: Stephen Boyd <stephen.b...@linaro.org> > --- > drivers/usb/chipidea/ci_hdrc_msm.c | 58 > +++

Re: [PATCH 13/21] usb: chipidea: msm: Allow core to get usb phy

2016-06-29 Thread Peter Chen
On Sun, Jun 26, 2016 at 12:28:30AM -0700, Stephen Boyd wrote: > The chipidea core gets the usb phy and initializes the phy at the > right point now so we don't need to get the phy in this driver. > > Cc: Peter Chen <peter.c...@nxp.com> > Cc: Greg Kroah-Hartman <gr

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

2016-06-29 Thread Peter Chen
ionally, so I use one system flag CI_HDRC_SUPPORTS_RUNTIME_PM for it. I can't understand why you can't access device without enable parent's runtime pm, the controller will not enter runtime suspend without that flag. Peter > > Cc: Peter Chen <peter.c...@nxp.com> > Cc: Greg Kroah

Re: [PATCH 11/21] usb: chipidea: msm: Use hw_write_id_reg() instead of writel directly

2016-06-29 Thread Peter Chen
we're using and avoids needing to > include the msm_hsusb_hw.h file when we're going to delete that > file soon. > > Cc: Peter Chen <peter.c...@nxp.com> > Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> > Signed-off-by: Stephen Boyd <stephen.b...@linaro.org>

Re: [PATCH 10/21] usb: chipidea: msm: Rely on core to override AHBBURST

2016-06-29 Thread Peter Chen
a devices so setting the flag in the driver > works just as well. You still need to set AHB burst value at dts, this flag is just for override, see below: ahb-burst-config = <0x0>; > > Cc: Peter Chen <peter.c...@nxp.com> > Cc: Greg Kroah-Hartman <gre...@linuxfounda

Re: [PATCH 09/21] usb: chipidea: Add support for ULPI PHY bus

2016-06-29 Thread Peter Chen
ewport logic in each phy driver. > > Cc: Peter Chen <peter.c...@nxp.com> > Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> > Cc: Heikki Krogerus <heikki.kroge...@linux.intel.com> > Signed-off-by: Stephen Boyd <stephen.b...@linaro.org> > --- > driver

Re: [PATCH 08/21] usb: chipidea: Kick OTG state machine for AVVIS with vbus extcon

2016-06-28 Thread Peter Chen
ble; status = "okay"; }; See Documentation/devicetree/bindings/usb/generic.txt. Peter > Cc: Peter Chen <peter.c...@nxp.com> > Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> > Signed-off-by: Stephen Boyd <stephen.b...@linaro.org> > --- > d

Re: [PATCH 06/21] usb: chipidea: Initialize and reinitialize phy later

2016-06-28 Thread Peter Chen
o add one flag at ci_hdrc_platform_data.flags for your case to avoid normal initialization. Peter > Move > the phy initialization to a later point, and shut it down outside > of driver remove so that the phy state is properly managed across > role switches. > > Cc: Peter Chen <

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

2016-06-28 Thread Peter Chen
me simpler. I'll try this out. > > I was hoping that we could manage with product id 0 as an exception (I > failed to consider that you have multiple PHYs to deal with). I don't > think we can just come up with product id > 0. > > I guess we should have the of_driver_match_device() call after all. > Let's just call it conditionally, only in cases where there is no > product ID, to make me feel a bit more better. I don't want to make it > too easy to use. > > The properties for the vendor and product ID are still something that > we need to introduce in any case. We have the powered off problem on > all kinds of platforms, and not all of them use DT. I am thinking power sequence framework, how power sequence elements (eg, clock, reset-gpios) can get for non-DT platform? Does ACPI does power sequence for x86 platforms? -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 05/21] usb: chipidea: Handle extcon events properly

2016-06-28 Thread Peter Chen
the hardware. Therefore, properly emulate this > register if we're using extcon, but don't enable the interrupts. > This allows me to get my cable connect/disconnect working > properly without getting spurious interrupts on my device that > uses an extcon for these two events. > > Cc:

Re: [PATCH 04/21] usb: chipidea: Only read/write OTGSC from one place

2016-06-28 Thread Peter Chen
eturns an error code if timeout */ static int > > > +hw_wait_otgsc_bsv(struct ci_hdrc *ci) { > > > + unsigned long elapse = jiffies + msecs_to_jiffies(5000); > > > + u32 mask = OTGSC_BSV; > > > + > > > + while (!hw_read_otgsc(ci, mask)

Re: [PATCH v11 08/14] usb: otg: add OTG/dual-role core

2016-06-22 Thread Peter Chen
On Wed, Jun 22, 2016 at 09:56:22AM +0300, Felipe Balbi wrote: > > Hi, > > Peter Chen <hzpeterc...@gmail.com> writes: > >> Peter Chen <hzpeterc...@gmail.com> writes: > >> >> >> So far, I haven't seen anybody talking about real USB OTG (the

Re: [PATCH v11 08/14] usb: otg: add OTG/dual-role core

2016-06-22 Thread Peter Chen
On Wed, Jun 22, 2016 at 09:51:19AM +0300, Felipe Balbi wrote: > > Hi, > > Peter Chen <hzpeterc...@gmail.com> writes: > >> >> >> > So, unless we use OTG FSM defined in OTG spec, we should not > >> >> >> > mention > >&g

Re: [PATCH v11 08/14] usb: otg: add OTG/dual-role core

2016-06-21 Thread Peter Chen
On Tue, Jun 21, 2016 at 05:47:47PM +0300, Felipe Balbi wrote: > > Hi, > > Peter Chen <hzpeterc...@gmail.com> writes: > >> >> >> >> >>> + * @otg_dev: OTG controller device, if needs to be used with > >> >> >> >> &g

Re: [PATCH 08/12] doc: binding: pwrseq-usb-generic: add binding doc for generic usb power sequence driver

2016-06-21 Thread Peter Chen
On Tue, Jun 21, 2016 at 04:26:53PM -0500, Rob Herring wrote: > On Tue, Jun 21, 2016 at 10:11:17AM +0800, Peter Chen wrote: > > On Mon, Jun 20, 2016 at 11:16:07AM -0500, Rob Herring wrote: > > > On Mon, Jun 20, 2016 at 07:26:51PM +0800, Peter Chen wrote: > > > > On F

Re: [PATCH v11 08/14] usb: otg: add OTG/dual-role core

2016-06-21 Thread Peter Chen
On Tue, Jun 21, 2016 at 01:02:59PM +0300, Felipe Balbi wrote: > > Hi, > > Peter Chen <hzpeterc...@gmail.com> writes: > >> >> So far, I haven't seen anybody talking about real USB OTG (the spec) > >> >> when they say OTG. Usually they just

Re: [PATCH v11 08/14] usb: otg: add OTG/dual-role core

2016-06-21 Thread Peter Chen
On Tue, Jun 21, 2016 at 03:35:00PM +0300, Felipe Balbi wrote: > > Hi, > > Peter Chen <hzpeterc...@gmail.com> writes: > >> >> >> >>> + * @otg_dev: OTG controller device, if needs to be used with > >> >> >> >>> OTG c

Re: [PATCH v11 08/14] usb: otg: add OTG/dual-role core

2016-06-21 Thread Peter Chen
On Tue, Jun 21, 2016 at 11:18:21AM +0300, Felipe Balbi wrote: > > Hi, > > Peter Chen <hzpeterc...@gmail.com> writes: > >> Peter Chen <hzpeterc...@gmail.com> writes: > >> >> >>> + > >> >> >>> +

Re: [PATCH v11 08/14] usb: otg: add OTG/dual-role core

2016-06-21 Thread Peter Chen
the host driver is at host/ and udc driver is > > at gadget/udc, how to finish to role swap? > > ... why does the source code placement matter? And what do you mean by > "finish role swap"? > Well, it depends on your driver design, do you want the host driver's API i

Re: [PATCH v11 08/14] usb: otg: add OTG/dual-role core

2016-06-21 Thread Peter Chen
On Tue, Jun 21, 2016 at 10:19:32AM +0300, Felipe Balbi wrote: > > Hi, > > Peter Chen <hzpeterc...@gmail.com> writes: > >> >>> + > >> >>> + /* start host */ > >> >>> + ret = hcd_ops-&

Re: [PATCH v11 08/14] usb: otg: add OTG/dual-role core

2016-06-21 Thread Peter Chen
t; > frankly, I would NEVER talk about OTG when type-C comes into play. They > are two competing standards and, apparently, type-C is winning when it > comes to role-swapping. > In fact, OTG is mis-used by people. Currently, if the port is dual-role, It will be considered as an OTG port

Re: [PATCH v11 08/14] usb: otg: add OTG/dual-role core

2016-06-21 Thread Peter Chen
On Mon, Jun 20, 2016 at 03:08:15PM +0300, Felipe Balbi wrote: > > Hi, > > Peter Chen <hzpeterc...@gmail.com> writes: > >> Roger Quadros <rog...@ti.com> writes: > >> > It provides APIs for the following tasks > >> > > >> > -

[PATCH 1/1] usb: chipidea: Kconfig: improve Kconfig help text

2016-06-20 Thread Peter Chen
Chipidea driver has been updated a lot, and more functions are supported, update Kconfig help text accordingly. Signed-off-by: Peter Chen <peter.c...@nxp.com> --- drivers/usb/chipidea/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/chipidea/Kco

[GIT PULL] USB OTG FSM Fix for v4.7-rc5

2016-06-20 Thread Peter Chen
in OTG FSM Oscar (1): usb: common: otg-fsm: add license to usb-otg-fsm drivers/usb/common/usb-otg-fsm.c | 2 ++ 1 file changed, 2 insertions(+) -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line

Re: [PATCH 07/12] power: pwrseq: rename file name for generic driver

2016-06-20 Thread Peter Chen
On Mon, Jun 20, 2016 at 02:48:20PM +0200, Krzysztof Kozlowski wrote: > On 06/17/2016 12:09 PM, Peter Chen wrote: > > The individual driver file name is better to contain module name. > > > > Signed-off-by: Peter Chen <peter.c...@nxp.com> > > --- > > ...

Re: [PATCH 08/12] doc: binding: pwrseq-usb-generic: add binding doc for generic usb power sequence driver

2016-06-20 Thread Peter Chen
On Mon, Jun 20, 2016 at 08:29:55PM +0800, Chen-Yu Tsai wrote: > Hi, > > On Mon, Jun 20, 2016 at 7:26 PM, Peter Chen <hzpeterc...@gmail.com> wrote: > > On Fri, Jun 17, 2016 at 12:16:48PM -0500, Rob Herring wrote: > >> On Fri, Jun 17, 2016 at 5:09 AM, Peter C

Re: [PATCH 08/12] doc: binding: pwrseq-usb-generic: add binding doc for generic usb power sequence driver

2016-06-20 Thread Peter Chen
On Mon, Jun 20, 2016 at 11:16:07AM -0500, Rob Herring wrote: > On Mon, Jun 20, 2016 at 07:26:51PM +0800, Peter Chen wrote: > > On Fri, Jun 17, 2016 at 12:16:48PM -0500, Rob Herring wrote: > > > On Fri, Jun 17, 2016 at 5:09 AM, Peter Chen <peter.c...@nxp.com> wrote:

Re: [PATCH v11 08/14] usb: otg: add OTG/dual-role core

2016-06-20 Thread Peter Chen
with OTG core. > > do you really know of any platform which has a separate OTG controller? > It may not be a real separate OTG controller. It can be a hardware part (external connector, external IC, SoC OTG register area, etc) to handle vbus ,id and other signals which are used for role swap.

Re: [PATCH 00/12] power: add generic power sequence framework

2016-06-20 Thread Peter Chen
On Sat, Jun 18, 2016 at 01:29:05AM +0200, Maciej S. Szmigiero wrote: > Hi Peter, > > On 17.06.2016 12:09, Peter Chen wrote: > > Hi all, > > > > We have an well-known problem that the device needs to do some power > > sequence before it can be recognized by rela

Re: [PATCH 08/12] doc: binding: pwrseq-usb-generic: add binding doc for generic usb power sequence driver

2016-06-20 Thread Peter Chen
On Fri, Jun 17, 2016 at 12:16:48PM -0500, Rob Herring wrote: > On Fri, Jun 17, 2016 at 5:09 AM, Peter Chen <peter.c...@nxp.com> wrote: > > Add binding doc for generic usb power sequence driver, and update > > generic usb device binding-doc accordingly. > > > > S

[PATCH 05/12] power: pwrseq: Generalize mmc_pwrseq operations by removing mmc prefix

2016-06-17 Thread Peter Chen
From: Krzysztof Kozlowski The power sequence hooks (mmc_pwrseq_pre_power_on(), mmc_pwrseq_post_power_on() and mmc_pwrseq_power_off()) can be made more generic to allow re-use in other subsystems. They do not need to take pointer to struct mmc_host but instead the struct

[PATCH 06/12] power: pwrseq: change common helpers as generic

2016-06-17 Thread Peter Chen
These helpers are only used by mmc now, change them as generic and do corresponding changes at mmc code. Meanwhile, change return value of helper pwrseq_pre_power_on since it may occur error during enable clock/regulator, etc. Signed-off-by: Peter Chen <peter.c...@nxp.com> --- drivers/mm

[PATCH 01/12] power/mmc: Move pwrseq drivers to power/pwrseq

2016-06-17 Thread Peter Chen
From: Krzysztof Kozlowski The MMC power sequence drivers are useful also outside of MMC world: for USB devices needed a hard-reset before probing. Before extending and re-using pwrseq drivers, move them to a new place. The commit does not introduce significant changes

[PATCH 07/12] power: pwrseq: rename file name for generic driver

2016-06-17 Thread Peter Chen
The individual driver file name is better to contain module name. Signed-off-by: Peter Chen <peter.c...@nxp.com> --- .../power/pwrseq/{pwrseq-simple.txt => mmc-pwrseq-simple.txt} | 0 drivers/power/pwrseq/Makefile | 4 ++-- drivers/pow

[PATCH 02/12] MAINTAINERS: Retain Ulf Hansson as the same maintainer of pwrseq

2016-06-17 Thread Peter Chen
From: Krzysztof Kozlowski Before moving pwrseq drivers from drivers/mmc/core/ to drivers/power/, they were maintained by Ulf Hansson. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas ---

[PATCH 08/12] doc: binding: pwrseq-usb-generic: add binding doc for generic usb power sequence driver

2016-06-17 Thread Peter Chen
Add binding doc for generic usb power sequence driver, and update generic usb device binding-doc accordingly. Signed-off-by: Peter Chen <peter.c...@nxp.com> --- .../bindings/power/pwrseq/pwrseq-usb-generic.txt | 31 ++ .../devicetree/bindings/usb/usb-device.txt

[PATCH 04/12] power: pwrseq: Remove mmc prefix from mmc_pwrseq

2016-06-17 Thread Peter Chen
From: Krzysztof Kozlowski The "mmc" prefix is no longer needed after moving the pwrseq core code from mmc/ to power/. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas ---

[PATCH 03/12] power: pwrseq: Enable COMPILE_TEST for drivers

2016-06-17 Thread Peter Chen
From: Krzysztof Kozlowski Allow build testing for power sequence drivers. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas --- drivers/power/pwrseq/Kconfig | 4 ++-- 1 file changed, 2

[PATCH 10/12] usb: core: add power sequence handling for USB devices

2016-06-17 Thread Peter Chen
ed on list. Signed-off-by: Peter Chen <peter.c...@nxp.com> --- drivers/usb/core/hub.c | 73 +++--- drivers/usb/core/hub.h | 1 + include/linux/pwrseq.h | 6 + 3 files changed, 77 insertions(+), 3 deletions(-) diff --git a/drivers/usb/core/hub.c b/

[PATCH 09/12] power: pwrseq: pwrseq_usb_generic: add generic power sequence support for USB deivces

2016-06-17 Thread Peter Chen
Add driver for generic power sequence support for USB deivces which handles below things: - Clock and its frequencies - GPIO for reset and the duration time - GPIO for enable - Regulator for power Signed-off-by: Peter Chen <peter.c...@nxp.com> --- drivers/power/pwrseq/Kconfig

[PATCH 12/12] ARM: dts: imx6qdl-udoo.dtsi: fix onboard USB HUB property

2016-06-17 Thread Peter Chen
From: Peter Chen <peter.c...@freescale.com> The current dts describes USB HUB's property at USB controller's entry, it is improper. The USB HUB should be the child node under USB controller, with "usb-pwrseq" phandle to handle power sequence stuffs. Signed-off-by: Pet

[PATCH 11/12] usb: chipidea: host: let the hcd know's parent device node

2016-06-17 Thread Peter Chen
From: Peter Chen <peter.c...@freescale.com> Since the hcd (chipidea core device) has no device node, so if we want to describe the child node under the hcd, we had to put it under its parent's node (glue layer device), and in the code, we need to let the hcd knows glue layer's code, then t

[PATCH 00/12] power: add generic power sequence framework

2016-06-17 Thread Peter Chen
for drivers power: pwrseq: Remove mmc prefix from mmc_pwrseq power: pwrseq: Generalize mmc_pwrseq operations by removing mmc prefix Peter Chen (7): power: pwrseq: change common helpers as generic power: pwrseq: rename file name for generic driver doc: binding: pwrseq-usb-generic: add binding

Re: [PATCH] USB: core: fix missing include

2016-06-16 Thread Peter Chen
ion of > >> 'usb_of_get_child_node' was here > >> static inline struct device_node *usb_of_get_child_node > >> ^~~~~ > >> > >> vim +/usb_of_get_child_node +32 drivers/usb/core/of.c > >> > >

[PATCH 1/1] usb: core: of.c: fix defined but not declare warning

2016-06-14 Thread Peter Chen
an Stern <st...@rowland.harvard.edu> Cc: linux-usb@vger.kernel.org Cc: linux-ker...@vger.kernel.org Cc: Ben Dooks <ben.do...@codethink.co.uk> Cc: linux-ker...@lists.codethink.co.uk Signed-off-by: Peter Chen <peter.c...@nxp.com> Reported-by: Ben Dooks <ben.do...@codethink.co.uk>

Re: [PATCH] USB: core: fix missing include

2016-06-14 Thread Peter Chen
gt; static inline struct device_node *usb_of_get_child_node > > ^ > > > > vim +/usb_of_get_child_node +32 drivers/usb/core/of.c > > > > 69bec725 Peter Chen 2016-02-19 26 * @portnum: the port number which > > dev

Re: [PATCH] usb: common: otg-fsm: add license to usb-otg-fsm

2016-06-14 Thread Peter Chen
On Tue, Jun 14, 2016 at 01:26:59PM +0200, Oscar wrote: > El 2016-06-14 08:26, Peter Chen escribió: > >On Mon, Jun 13, 2016 at 06:56:30PM +0200, Oscar wrote: > >>Fix warning about tainted kernel because usb-otg-fsm has no license. > >>WARNING: with this patch usb-o

Re: uac2: diagnosing uac2 audio gadget problems

2016-06-14 Thread Peter Chen
On Tue, Jun 14, 2016 at 02:00:23PM +0800, Peter Chen wrote: > On Mon, Jun 13, 2016 at 04:49:50PM -0700, Caleb Crome wrote: > > On Mon, Jun 13, 2016 at 4:04 PM, Caleb Crome <ca...@crome.org> wrote: > > > On Mon, Jun 13, 2016 at 2:53 AM, Peter Chen <hzpeterc...@gmail.com

Re: [PATCH] usb: common: otg-fsm: add license to usb-otg-fsm

2016-06-14 Thread Peter Chen
d; > } > EXPORT_SYMBOL_GPL(otg_statemachine); > +MODULE_LICENSE("GPL"); > -- I don't know why I can't apply your patch, does it make on an very old version? I apply it manually, thanks. -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line &qu

Re: uac2: diagnosing uac2 audio gadget problems

2016-06-14 Thread Peter Chen
On Mon, Jun 13, 2016 at 04:49:50PM -0700, Caleb Crome wrote: > On Mon, Jun 13, 2016 at 4:04 PM, Caleb Crome <ca...@crome.org> wrote: > > On Mon, Jun 13, 2016 at 2:53 AM, Peter Chen <hzpeterc...@gmail.com> wrote: > >> On Wed, Jun 08, 2016 at 04:11:11PM -0700, Caleb

Re: [PATCH v10 00/14] USB OTG/dual-role framework

2016-06-13 Thread Peter Chen
| 2 +- > drivers/usb/phy/phy-fsl-usb.c | 155 ++-- > drivers/usb/phy/phy-fsl-usb.h | 3 +- > include/linux/usb/gadget.h| 22 + > include/linux/usb/hcd.h | 29 + > include/linux/usb/of.h| 9 + > include/linux/usb/otg-fsm.h | 154 +--- > include/linux/usb/otg.h | 290 ++- > include/linux/usb/xhci_pdriver.h | 3 + > 29 files changed, 1918 insertions(+), 462 deletions(-) > create mode 100644 drivers/usb/common/usb-otg.c > > -- > 2.7.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-usb" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v3] usb: phy: mxs: Add DT bindings to configure TX settings

2016-06-13 Thread Peter Chen
> > There were also some Documentation changes from between when I > created this patch and the current HOL for which I had to modify the > patch. I will review and test your v4 patch, thanks. -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: uac2: diagnosing uac2 audio gadget problems

2016-06-13 Thread Peter Chen
aips-bus/2184000.usb/ci_hdrc.0/gadget/net/usb0, > iface: usb0): no ifupdown configuration found. > > > Any idea what could be wrong?Is the 'Failed to apply ACL' relavent? Sorry, I don't know what that mean, do that mean there is something wrong with your local codec? -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v11 08/14] usb: otg: add OTG/dual-role core

2016-06-13 Thread Peter Chen
t; The DRD state machine is only interested in 2 hardware inputs > 'id' and 'b_sess_vld'. > > Signed-off-by: Roger Quadros <rog...@ti.com> > --- > v11: > - remove usb_otg_kick_fsm(). > - typo fixes: structa/structure, upto/up to. > - remove "obj-$(C

Re: [PATCH v11 13/14] usb: gadget: udc: adapt to OTG core

2016-06-13 Thread Peter Chen
On Mon, Jun 13, 2016 at 10:55:12AM +0300, Roger Quadros wrote: > err1: > - if (ret != -EISNAM) > + if ((ret != -EISNAM)) Since you do not need above change. Expect above, I am ok with this patch. Acked-by: Peter Chen <peter.c...@nxp.com> > dev_err(>

<    3   4   5   6   7   8   9   10   11   12   >