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

2016-06-17 Thread Peter Chen
T 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 bi

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

2016-06-17 Thread Peter Chen
From: Peter Chen 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 the USB core can handle

[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 --- .../bindings/power/pwrseq/pwrseq-usb-generic.txt | 31 ++ .../devicetree/bindings/usb/usb-device.txt | 2 ++ 2 files changed

[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 --- drivers/power/pwrseq/pwrseq.c| 18 +- drivers/power/pwrseq/pwrseq_emmc.c

[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 insertions(+), 2 deletions(-) diff --git a/drivers/power/pwrseq/Kconfig b/drivers/po

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

2016-06-17 Thread Peter Chen
s at powered on list. Signed-off-by: Peter Chen --- 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/drivers/usb/core

[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 --- drivers/power/pwrseq/Kconfig | 11 ++ drivers/power

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

2016-06-17 Thread Peter Chen
From: Peter Chen 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: Peter Chen Signed-off-by: Maciej S.

[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 --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINE

[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 --- .../power/pwrseq/{pwrseq-simple.txt => mmc-pwrseq-simple.txt} | 0 drivers/power/pwrseq/Makefile | 4 ++-- drivers/power/pwrseq/{pwrseq.c =>

[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 in the pwrseq drivers code

[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 --- drivers/mmc/core/host.c

[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 pwrseq should be sufficien

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 wrote: > > Add binding doc for generic usb power sequence driver, and update > > generic usb device binding-doc accordingly. > > > > Signed-off-by: Peter Chen

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 v11 08/14] usb: otg: add OTG/dual-role core

2016-06-20 Thread Peter Chen
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

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 wrote: > > > > Add bin

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 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 wrote: > >> > A

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 > > --- > > .../power/pwrseq/{pwrseq-si

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

2016-06-20 Thread Peter Chen
le support 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: sen

[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 --- drivers/usb/chipidea/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/chipidea/Kconfig b/drivers/usb/chipidea

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

2016-06-20 Thread Peter Chen
On Mon, Jun 20, 2016 at 03:08:15PM +0300, Felipe Balbi wrote: > > Hi, > > Peter Chen writes: > >> Roger Quadros writes: > >> > It provides APIs for the following tasks > >> > > >> > - Registering an OTG/dual-role capable controller >

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

2016-06-20 Thread Peter Chen
swapping between XHCI and peripheral-only DWC3. > > 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

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 writes: > >> >>> + > >> >>> + /* start host */ > >> >>> + ret = hcd_ops->add(otg->primary_hcd

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

2016-06-21 Thread Peter Chen
comment. Semantics aside... > > > Consider the use case 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"? >

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 writes: > >> Peter Chen writes: > >> >> >>> + > >> >> >>> + /* start host */ > >> >> >>> +

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 writes: > >> >> >> >>> + * @otg_dev: OTG controller device, if needs to be used with > >> >> >> >>> OTG core. > >> &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 01:02:59PM +0300, Felipe Balbi wrote: > > Hi, > > Peter Chen writes: > >> >> So far, I haven't seen anybody talking about real USB OTG (the spec) > >> >> when they say OTG. Usually they just mean "a method for swappi

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 05:47:47PM +0300, Felipe Balbi wrote: > > Hi, > > Peter Chen writes: > >> >> >> >> >>> + * @otg_dev: OTG controller device, if needs to be used with > >> >> >> >> >>> OTG core. > &

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 writes: > >> >> >> > So, unless we use OTG FSM defined in OTG spec, we should not > >> >> >> > mention > >> >> >> > "

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 writes: > >> Peter Chen writes: > >> >> >> So far, I haven't seen anybody talking about real USB OTG (the spec) > >> >> >> when they say OT

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

2016-06-28 Thread Peter Chen
; + * This function returns 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(

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

2016-06-28 Thread Peter Chen
hose events in 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

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

2016-06-28 Thread Peter Chen
all that is I can drop requesting the module by DT > > aliases and things become 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 06/21] usb: chipidea: Initialize and reinitialize phy later

2016-06-28 Thread Peter Chen
you need to 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:

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

2016-06-28 Thread Peter Chen
able; adp-disable; status = "okay"; }; See Documentation/devicetree/bindings/usb/generic.txt. Peter > Cc: Peter Chen > Cc: Greg Kroah-Hartman > Signed-off-by: Stephen Boyd > --- > drivers/usb/chipidea/otg_fsm.c | 17 + > 1 file chang

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

2016-06-28 Thread Peter Chen
ort logic in each phy driver. > > Cc: Peter Chen > Cc: Greg Kroah-Hartman > Cc: Heikki Krogerus > Signed-off-by: Stephen Boyd > --- > drivers/usb/chipidea/Kconfig | 7 +++ > drivers/usb/chipidea/Makefile | 1 + > drivers/usb/chipidea/ci.h | 20

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

2016-06-28 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 > Cc: Greg Kroah-Hartman > Signed-off-by: Stephen Boyd > --- >

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

2016-06-28 Thread Peter Chen
offset 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 > Cc: Greg Kroah-Hartman > Signed-off-by: Stephen Boyd > --- > drivers/usb/chipidea/ci_hdrc_msm.c | 6 ++ > 1 file

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

2016-06-28 Thread Peter Chen
onditionally, 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 > Cc: Greg Kroah-Hartma

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

2016-06-28 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 > Cc: Greg Kroah-Hartman > Signed-off-by: Stephen Boy

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

2016-06-29 Thread Peter Chen
elf, so we > must turn it on here. > > Cc: Peter Chen > Cc: Greg Kroah-Hartman > Signed-off-by: Stephen Boyd > --- > drivers/usb/chipidea/ci_hdrc_msm.c | 58 > +++--- > 1 file changed, 54 insertions(+), 4 deletions(-) > >

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

2016-06-29 Thread Peter Chen
o 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 > Cc: Greg Kroah-Hartman > Signed-off-by: Stephen Boyd > --- > dri

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

2016-06-29 Thread Peter Chen
phy 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 > Cc: Greg Kroah-Hartman > Signed-off

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

2016-06-29 Thread Peter Chen
09 r5: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+

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

2016-06-29 Thread Peter Chen
388 r7:0001 > > r6:806118dc r5:6153 [ 183.445175] r4: [ 183.447758] > > [<8016ff1c>] (lock_acquire) from [<80947c18>] > > (mutex_lock_nested+0x54/0x3ec) > > [ 183.455864] r7:bdb7bc00 r6:8174e47c r5:806118dc r4:0000 > > [ 183.461645] [<80947bc4&

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

2016-06-29 Thread Peter Chen
ce is 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 > Cc: Greg Kroah-Hartman > Signed-off-by: Stephen Boyd > --- > drivers/usb/chipid

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 18/21] usb: chipidea: msm: Add reset controller for PHY POR bit

2016-06-29 Thread Peter Chen
time during initialization. > > Cc: Peter Chen > Cc: Greg Kroah-Hartman > Signed-off-by: Stephen Boyd > --- > drivers/usb/chipidea/ci_hdrc_msm.c | 43 > +- > 1 file changed, 42 insertions(+), 1 deletion(-) > > diff --git a/drivers/u

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. Add t

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 > Cc: Greg Kroah-Hartm

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 res

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 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 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 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 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 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] 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 RFC 3/4] usb: chipidea: udc: Avoid busy wait in reset ISR

2016-06-30 Thread Peter Chen
; 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 timeout (100ms) as an improvement. --

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

2016-06-30 Thread Peter Chen
the 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

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

2016-06-30 Thread Peter Chen
1, 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 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:

[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

[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 --- drivers/usb/gadget/function/u_ether.c | 2 +- 1 file changed, 1 insertion(+), 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 --- drivers/usb/gadget/composite.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/

[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 --- drivers/usb/gadget/function/u_ether.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/fu

Re: [PATCH v3 0/7] support other fsl SoCs with usbmisc + small fixes

2012-11-22 Thread Peter Chen
pidea: usbmisc: rename file, struct and functions to > > usbmisc_imx > > usb: chipidea: usbmisc: add mx53 support > > usb: chipidea: usbmisc: add post handling and errata fix for mx25 > > Cc'ing Peter Chen, in case he didn't see this. Peter, can you have

Re: [PATCH v3 3/7] usb: chipidea: usbmisc: fix a potential race condition

2012-11-22 Thread Peter Chen
return ret; > } > > - usbmisc = data; > - > return 0; > } > > -- > 1.7.10.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-usb" in > the body of a message to majord...@vger.kernel.org > More m

Re: [PATCH v3 5/7] usb: chipidea: usbmisc: add support for ahb, ipg and per clock

2012-11-22 Thread Peter Chen
> static int __devexit usbmisc_imx_remove(struct platform_device *pdev) > { > usbmisc_unset_ops(usbmisc->ops); > - clk_disable_unprepare(usbmisc->clk); > + clk_disable_unprepare(usbmisc->clk_per); > + clk_disable_unprepare(usbmisc->clk_ipg); > + clk_disable_unprepare(usbmisc->clk_ahb); > usbmisc = NULL; > return 0; > } > -- > 1.7.10.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 6/7] usb: chipidea: usbmisc: add mx53 support

2012-11-22 Thread Peter Chen
{ .compatible = "fsl,imx53-usbmisc", .data = (void *)&imx53_usbmisc_ops > }, > { .compatible = "fsl,imx6q-usbmisc", .data = (void *)&imx6q_usbmisc_ops > }, > { /* sentinel */ } > }; > -- > 1.7.10.4 > > -- > To unsubscribe from

Re: [PATCH v3 7/7] usb: chipidea: usbmisc: add post handling and errata fix for mx25

2012-11-22 Thread Peter Chen
gt; 1.7.10.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] USB: chipidea: promote error code from ci_role_start() start instead of returning -ENODEV

2012-11-22 Thread Peter Chen
n > 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 6/7] usb: chipidea: usbmisc: add mx53 support

2012-11-25 Thread Peter Chen
On Fri, Nov 23, 2012 at 08:39:39AM +0100, Sascha Hauer wrote: > On Fri, Nov 23, 2012 at 02:53:41PM +0800, Peter Chen wrote: > > On Wed, Nov 21, 2012 at 03:06:32PM +0100, Michael Grzeschik wrote: > > > This adds mx53 as the next user of the usbmisc driver and makes it > > &

Re: [PATCH v3 6/7] usb: chipidea: usbmisc: add mx53 support

2012-11-25 Thread Peter Chen
On Fri, Nov 23, 2012 at 11:02:13AM +0100, Marc Kleine-Budde wrote: > On 11/23/2012 07:53 AM, Peter Chen wrote: > > On Wed, Nov 21, 2012 at 03:06:32PM +0100, Michael Grzeschik wrote: > >> This adds mx53 as the next user of the usbmisc driver and makes it > >> possible

Re: [PATCH v3 5/7] usb: chipidea: usbmisc: add support for ahb, ipg and per clock

2012-11-25 Thread Peter Chen
le using id_table or what else platform specific. > > Regards, > Michael > > -- > Pengutronix e.K. | | > Industrial Linux Solutions | http://www.pengutronix.de/ | > Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0| > Amtsgericht Hil

[PATCH v3 1/7] Revert "USB: chipidea: add vbus detect for udc"

2012-11-26 Thread Peter Chen
vbus register is at otgsc, and vbus detect does not belong to device function. Revert this patch, and will move vbus detect function to drivers/usb/chipidea/udc.c This reverts commit 8c4fc031954b4eb72daf13d3c907a985a3eee208. Signed-off-by: Peter Chen --- Changes for v3: Add Signed-off-by: Peter

[PATCH v3 2/7] usb: chipidea: add otg file

2012-11-26 Thread Peter Chen
Implement struct usb_otg, In that way, calling otg_set_peripheral will not be failed at udc.c. Signed-off-by: Peter Chen --- drivers/usb/chipidea/Makefile |2 +- drivers/usb/chipidea/ci.h |2 + drivers/usb/chipidea/otg.c| 60 + drivers

[PATCH v3 0/7] Add fully tested id switch and vbus connect detect support for Chipidea

2012-11-26 Thread Peter Chen
Peter Chen (7): Revert "USB: chipidea: add vbus detect for udc" usb: chipidea: add otg file usb: chipidea: add otg id switch and vbus connect/disconnect detect usb: chipidea: consolidate ci_role_driver's API for both roles usb: chipidea: udc: add pullup/pulldown dp at hw_dev

[PATCH v3 5/7] usb: chipidea: udc: add pullup/pulldown dp at hw_device_state

2012-11-26 Thread Peter Chen
- During the connect/disconnect host, we need to pullup and pulldown dp - Make sure the dp is not pullup until the vbus is on when flag CI13XXX_PULLUP_ON_VBUS is set - Using hw_device_state when set run/stop bit Signed-off-by: Peter Chen --- drivers/usb/chipidea/udc.c | 10 -- 1 files

[PATCH v3 4/7] usb: chipidea: consolidate ci_role_driver's API for both roles

2012-11-26 Thread Peter Chen
- Create init/destroy API for probe and remove - start/stop API are only used otg id switch process - Create the gadget at ci_hdrc_probe if the gadget is supported at that port, the main purpose for this is to avoid gadget module load fail at init.rc Signed-off-by: Peter Chen --- Changes for v3

[PATCH v3 6/7] usb: chipidea: udc: retire the flag CI13_PULLUP_ON_VBUS

2012-11-26 Thread Peter Chen
host. Signed-off-by: Peter Chen --- drivers/usb/chipidea/ci13xxx_imx.c |1 - drivers/usb/chipidea/ci13xxx_msm.c |1 - drivers/usb/chipidea/udc.c | 23 --- include/linux/usb/chipidea.h |1 - 4 files changed, 8 insertions(+), 18 deletions(-) diff

[PATCH v3 3/7] usb: chipidea: add otg id switch and vbus connect/disconnect detect

2012-11-26 Thread Peter Chen
e interrupt handler, it can notify udc driver by calling usb_gadget_vbus_disconnect /usb_gadget_vbus_connect. Signed-off-by: Peter Chen --- Changes for v3: - Add prefix CI_ for ID and B_SESS_VALID - Use new API hw_wait_reg which is alexander sugguested to wait vbus voltage stable drivers/usb/chip

[PATCH v3 7/7] usb: chipidea: imx: add internal vbus regulator control

2012-11-26 Thread Peter Chen
- For host, the vbus should always be on. - For otg, the vbus is off defaultly, the vbus needs to be turned on/off when usb role switches. Signed-off-by: Peter Chen --- Changes for v3: - Add return value check for regulator_enable/regulator_disable - typo error drivers/usb/chipidea/ci.h

Re: [PATCH 2/9] usb: chipidea: ci13xxx_imx: add 2nd and 3rd clock to support imx5x and newer

2012-11-26 Thread Peter Chen
(phy_np) > of_node_put(phy_np); > - clk_disable_unprepare(data->clk); > + clk_disable_unprepare(data->clk_per); > +err_per_failed: > + clk_disable_unprepare(data->clk_ipg); > +err_ipg_failed: > + clk_disable_unprepare(data->clk_ahb); >

Re: [PATCH 4/9] usb: chipidea: ci13xxx-imx: add "dr_mode" property to device tree bindings

2012-11-26 Thread Peter Chen
ree > users), since you're saying that other drivers are using this already. > > Looks good to me otherwise. I think it supplies a way that the platform can override the usb role, only freescale uses it, but also other platforms may use it. It is a generic feature, other chipidea users may need it. > > Regards, > -- > Alex > -- > 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 5/9] usb: add phy connection by phy-mode

2012-11-26 Thread Peter Chen
interface from device tree. > + */ > +static const char *usbphy_modes[] = { > + [USBPHY_INTERFACE_MODE_NA] = "", > + [USBPHY_INTERFACE_MODE_UTMI]= "utmi", > + [USBPHY_INTERFACE_MODE_UTMIW] = "utmiw", > + [USBPHY_INTERFACE_MODE_ULPI]

Re: [PATCH 6/9] usb: chipidea: add PTW and PTS handling

2012-11-26 Thread Peter Chen
data); > > +/* Parse of-tree "flags" */ > +void ci13xxx_get_dr_flags(struct device_node *of_node, struct > ci13xxx_platform_data *pdata); > + > #endif > -- > 1.7.10.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 2/9] usb: chipidea: ci13xxx_imx: add 2nd and 3rd clock to support imx5x and newer

2012-11-26 Thread Peter Chen
On Mon, Nov 26, 2012 at 11:22:32AM +0100, Sascha Hauer wrote: > On Mon, Nov 26, 2012 at 05:29:31PM +0800, Peter Chen wrote: > > On Wed, Nov 14, 2012 at 05:19:03PM +0100, Michael Grzeschik wrote: > > > This patch adds support for a second and third clock to the chipidea

Re: [PATCH 6/9] usb: chipidea: add PTW and PTS handling

2012-11-27 Thread Peter Chen
uot;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 > > > > > -- > Pengutronix e.K. |

Re: [PATCH v4 0/6] support other fsl SoCs with usbmisc + small fixes

2012-11-27 Thread Peter Chen
ch > before applying this series: > > https://github.com/hzpeterchen/linux-usb.git I have tested it at i.mx6q sabrelite board, it works good. I have pushed your commit to my git, please cc me your coming chipidea patches, thanks. Alex, please add: Reviewed-by: Peter Chen Tested-b

Re: 3.7 kernel hangs when doing scp

2012-12-19 Thread Peter Chen
tic void tdi_reset (struct ehci_hcd *ehci) tmp = ehci_readl(ehci, &ehci->regs->usbmode); tmp |= USBMODE_CM_HC; + tmp |= (1 << 4); /* disable stream mode */ /* The default byte access to MMR space is LE after * controller reset. Set the required

Re: 3.7 kernel hangs when doing scp

2012-12-20 Thread Peter Chen
bug, and needs to consider all usb modes. STAR 9000378958 Title: Non-Double Word Aligned Buffer Address Sometimes Causes Host to Hang on OUT Retry www.synopsys.com/dw/star.php?c=dwc_usb2_hs_otg_controller&fixedIn=2.20a To fix this, we need to add CI13XXX_DISABLE_STREAMING after role->

Re: Remove CONFIG_USB_SUSPEND?

2012-12-20 Thread Peter Chen
rg > 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: Remove CONFIG_USB_SUSPEND?

2012-12-20 Thread Peter Chen
On Thu, Dec 20, 2012 at 08:55:33PM -0800, Greg KH wrote: > On Fri, Dec 21, 2012 at 12:28:38PM +0800, Peter Chen wrote: > > On Tue, Dec 18, 2012 at 11:11:15AM -0500, Alan Stern wrote: > > > I suggest that we remove the CONFIG_USB_SUSPEND option, starting in > > > 3.9. P

Re: [PATCH] usb: chipidea: Allow disabling streaming not only in udc mode

2012-12-21 Thread Peter Chen
so allow disabling streaming also in host mode. > > Also, in order to make the compiler happy, ci_role_start() was moved after > hw_write(). > > Tested on a mx6qsabrelite board. > > Suggested-by: Peter Chen > Signed-off-by: Fabio Estevam > --- > drivers/usb/chipidea/

Re: Remove CONFIG_USB_SUSPEND?

2012-12-21 Thread Peter Chen
On Fri, Dec 21, 2012 at 07:00:58AM -0800, Greg KH wrote: > On Fri, Dec 21, 2012 at 01:21:18PM +0800, Peter Chen wrote: > > On Thu, Dec 20, 2012 at 08:55:33PM -0800, Greg KH wrote: > > > On Fri, Dec 21, 2012 at 12:28:38PM +0800, Peter Chen wrote: > > > > On Tue, De

Re: Remove CONFIG_USB_SUSPEND?

2012-12-21 Thread Peter Chen
On Fri, Dec 21, 2012 at 11:53:40AM -0500, Alan Stern wrote: > On Fri, 21 Dec 2012, Greg KH wrote: > > > On Fri, Dec 21, 2012 at 01:21:18PM +0800, Peter Chen wrote: > > > On Thu, Dec 20, 2012 at 08:55:33PM -0800, Greg KH wrote: > > > > On Fri, Dec 21, 2012 at 1

Re: [PATCH v3 2/7] usb: chipidea: add otg file

2012-12-24 Thread Peter Chen
On Thu, Nov 29, 2012 at 03:53:26PM +0200, Alexander Shishkin wrote: > Peter Chen writes: > > > diff --git a/drivers/usb/chipidea/ci.h b/drivers/usb/chipidea/ci.h > > index d738603..8702871 100644 > > --- a/drivers/usb/chipidea/ci.h > > +++ b/drivers/usb/chip

<    1   2   3   4   5   6   7   8   9   10   >