Re: [PATCH v5 5/6] usb: chipidea: let chipidea core device of_node equal's glue layer device of_node

2016-08-09 Thread Peter Chen
On Tue, Aug 09, 2016 at 05:15:36PM -0700, Stephen Boyd wrote: > Quoting Peter Chen (2016-08-08 01:52:10) > > From: Peter Chen <peter.c...@freescale.com> > > > > At device tree, we have no device node for chipidea core, > > the glue layer's node is the parent

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

2016-08-09 Thread Peter Chen
On Tue, Aug 09, 2016 at 04:33:35PM -0700, Joshua Clayton wrote: > Hi Peter, > > On 08/08/2016 01:52 AM, Peter Chen wrote: > > The current dts describes USB HUB's property at USB controller's > > entry, it is improper. The USB HUB should be the child node > > unde

Re: [PATCH V2] usb: chipidea: udc: Use direction flags consequently

2016-08-09 Thread Peter Chen
fea65de0427f5d5734 Author: Stefan Wahren <stefan.wah...@i2se.com> Date: Sat Jul 9 14:16:40 2016 + usb: chipidea: udc: Use direction flags consequently This driver make assumptions about the value of the direction flags. So better use them in comparisons to improve the read

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

2016-08-09 Thread Peter Chen
On Tue, Aug 09, 2016 at 04:06:22PM +0200, Greg KH wrote: > On Fri, Jul 08, 2016 at 04:15:22PM +0800, Peter Chen wrote: > > It can simplify root Kconfig > > Why does it matter? > When I try to move ulpi Kconfig from usb host out, I need to find some place to put it, it is ok t

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

2016-08-09 Thread Peter Chen
On Tue, Aug 09, 2016 at 04:06:31PM +0200, Greg KH wrote: > On Fri, Jul 08, 2016 at 04:15:23PM +0800, Peter Chen wrote: > > 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.

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

2016-08-09 Thread Peter Chen
>> On Fri, Aug 05, 2016 at 02:46:00PM -0700, Stephen Boyd wrote: >> > Quoting Peter Chen (2016-07-08 02:25:35) >> > > >> > > How you handle the code for PHY getting at probe? >> > > >> > >> > Which probe? Glue layer probe? In

Re: [RESEND PATCH] usb: hub: change CLEAR_FEATURE to SET_FEATURE

2016-08-09 Thread Peter Chen
On Tue, Aug 9, 2016 at 4:25 PM, Greg Kroah-Hartman <gre...@linuxfoundation.org> wrote: > On Tue, Aug 09, 2016 at 04:07:56PM +0800, yonglong.wu wrote: >> Hi, >> On Tue, 2016-08-09 at 14:29 +0800, Peter Chen wrote: >> >> On Tue, Aug 9, 2016 at 11:31 AM, Yong

Re: [RESEND PATCH] usb: hub: change CLEAR_FEATURE to SET_FEATURE

2016-08-09 Thread Peter Chen
On Tue, Aug 9, 2016 at 11:31 AM, Yonglong Wu wrote: > From: Yonglong Wu > > According to USB30 specification, the Function Remote Wakeup field can be > modified by the SetFeature() requests. SetFeature() is recommended to use. > >

RE: [PATCH v2 08/22] usb: chipidea: Remove locking in ci_udc_start()

2016-08-08 Thread Peter Chen
>Quoting Peter Chen (2016-08-06 00:54:35) >> On Fri, Aug 05, 2016 at 02:53:56PM -0700, Stephen Boyd wrote: >> > Quoting Peter Chen (2016-07-08 02:45:28) >> > > On Thu, Jul 07, 2016 at 03:20:59PM -0700, Stephen Boyd wrote: >> > > > We don't call

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

2016-08-08 Thread 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, and power sequence properties are under it. Signed-off-by: Peter Chen <peter.c...@nxp.com> --- arch/arm/boot/dts/imx6qdl-udoo.dts

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

2016-08-08 Thread Peter Chen
Add optional properties for power sequence. Signed-off-by: Peter Chen <peter.c...@nxp.com> Acked-by: Rob Herring <r...@kernel.org> --- Documentation/devicetree/bindings/usb/usb-device.txt | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Documentatio

[PATCH v5 5/6] usb: chipidea: let chipidea core device of_node equal's glue layer device of_node

2016-08-08 Thread Peter Chen
From: Peter Chen <peter.c...@freescale.com> At device tree, we have no device node for chipidea core, the glue layer's node is the parent node for host and udc device. But in related driver, the parent device is chipidea core. So, in order to let the common driver get parent's node,

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

2016-08-08 Thread Peter Chen
). At hub_disconnect, it will do power off sequence which is at powered on list. Signed-off-by: Peter Chen <peter.c...@nxp.com> Tested-by Joshua Clayton <stillcompil...@gmail.com> --- drivers/usb/core/Makefile | 1 + drivers/usb/core/hub.c| 12 -- drivers/usb/core/hu

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

2016-08-08 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> Tested-by Joshua Clayton <stillcompil...@gmail.com> --- MAINTAINERS

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

2016-08-08 Thread Peter Chen
Add binding doc for generic power sequence library. Signed-off-by: Peter Chen <peter.c...@nxp.com> Acked-by: Philipp Zabel <p.za...@pengutronix.de> Acked-by: Rob Herring <r...@kernel.org> --- .../bindings/power/pwrseq/pwrseq-generic.txt | 48 ++

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

2016-08-08 Thread Peter Chen
layer's at core's probe Peter Chen (6): binding-doc: power: pwrseq-generic: add binding doc for generic power sequence library power: add power sequence library binding-doc: usb: usb-device: add optional properties for power sequence usb: core: add power sequence handling f

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

2016-08-07 Thread Peter Chen
On Sat, Aug 06, 2016 at 02:00:08PM +0200, Oscar wrote: > El 2016-08-02 05:30, Peter Chen escribió: > >Hi all, > > > >This is a follow-up for my last power sequence framework patch set > >[1]. > >According to Rob Herring and Ulf Hansson's comments[2], I use a >

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

2016-08-06 Thread Peter Chen
On Fri, Aug 05, 2016 at 02:41:37PM -0700, Stephen Boyd wrote: > Quoting Peter Chen (2016-07-08 02:14:57) > > On Thu, Jul 07, 2016 at 03:20:55PM -0700, Stephen Boyd wrote: > > > diff --git a/drivers/usb/chipidea/otg.c b/drivers/usb/chipidea/otg.c > > > index 03b674

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

2016-08-06 Thread Peter Chen
On Fri, Aug 05, 2016 at 02:46:00PM -0700, Stephen Boyd wrote: > Quoting Peter Chen (2016-07-08 02:25:35) > > On Thu, Jul 07, 2016 at 03:20:57PM -0700, Stephen Boyd wrote: > > > The ULPI phy on qcom platforms needs to be initialized and > > > powered on after a USB

Re: [PATCH v2 08/22] usb: chipidea: Remove locking in ci_udc_start()

2016-08-06 Thread Peter Chen
On Fri, Aug 05, 2016 at 02:53:56PM -0700, Stephen Boyd wrote: > Quoting Peter Chen (2016-07-08 02:45:28) > > On Thu, Jul 07, 2016 at 03:20:59PM -0700, Stephen Boyd wrote: > > > We don't call hw_device_reset() with the ci->lock held, so it > > > doesn't seem lik

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

2016-08-04 Thread Peter Chen
On Wed, Aug 03, 2016 at 03:16:58PM -0700, Matthias Kaehlcke wrote: > El Tue, Aug 02, 2016 at 11:30:48AM +0800 Peter Chen ha dit: > > > diff --git a/drivers/power/pwrseq/core.c b/drivers/power/pwrseq/core.c > > > > ... > > > > +static DEFINE_MUTEX(pwrse

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

2016-08-02 Thread Peter Chen
On Fri, Jul 01, 2016 at 03:33:30PM +0800, Peter Chen wrote: > 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>

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

2016-08-01 Thread 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, and power sequence properties are under it. Signed-off-by: Peter Chen <peter.c...@nxp.com> --- arch/arm/boot/dts/imx6qdl-udoo.dts

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

2016-08-01 Thread Peter Chen
Add optional properties for power sequence. Signed-off-by: Peter Chen <peter.c...@nxp.com> Acked-by: Rob Herring <r...@kernel.org> --- Documentation/devicetree/bindings/usb/usb-device.txt | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Documentatio

[PATCH v4 5/6] usb: chipidea: let chipidea core device of_node equal's glue layer device of_node

2016-08-01 Thread Peter Chen
From: Peter Chen <peter.c...@freescale.com> At device tree, we have no device node for chipidea core, the glue layer's node is the parent node for host and udc device. But in related driver, the parent device is chipidea core. So, in order to let the common driver get parent's node,

Re: [v3,2/6] power: add power sequence library

2016-08-01 Thread Peter Chen
s flags; > >+int reset_gpio, ret = 0; > >+ > >+pwrseq_gen->clk = of_clk_get_by_name(np, NULL); > This only gets the first of potentially multiple clocks, is that intended? Matthias, I have added multiple input clocks support at v4 patch set, and you are at cc

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

2016-08-01 Thread Peter Chen
Add binding doc for generic power sequence library. Signed-off-by: Peter Chen <peter.c...@nxp.com> Acked-by: Philipp Zabel <p.za...@pengutronix.de> Acked-by: Rob Herring <r...@kernel.org> --- .../bindings/power/pwrseq/pwrseq-generic.txt | 48 ++

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

2016-08-01 Thread Peter Chen
). At hub_disconnect, it will do power off sequence which is at powered on list. Signed-off-by: Peter Chen <peter.c...@nxp.com> Tested-by Joshua Clayton <stillcompil...@gmail.com> --- drivers/usb/core/Makefile | 1 + drivers/usb/core/hub.c| 12 -- drivers/usb/core/hu

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

2016-08-01 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> Tested-by Joshua Clayton <stillcompil...@gmail.com> --- MAINTAINERS

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

2016-08-01 Thread Peter Chen
erties at dt binding - Should use structure not but its pointer for kzalloc - Since chipidea core has no of_node, let core's of_node equals glue layer's at core's probe Peter Chen (6): binding-doc: power: pwrseq-generic: add binding doc for generic power sequence library power: add po

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

2016-08-01 Thread Peter Chen
ches which is not upstreamed to workaround one SoC problem. http://www.spinics.net/lists/linux-usb/msg98682.html Try to implement the design for notify_suspend/resume at drivers/usb/phy/phy-mxs-usb.c and drivers/usb/chipidea/host.c You can refer to the code at: http://git.freescale.com

Re: [v3,2/6] power: add power sequence library

2016-07-31 Thread Peter Chen
On Fri, Jul 29, 2016 at 01:06:48PM -0700, Matthias Kaehlcke wrote: > Hi Peter, > > Thanks for your work on this, a few comments inline > > > On 07/20/2016 02:40 AM, Peter Chen wrote: > > >... > > > >+static int pwrseq_generic_on(struct

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

2016-07-28 Thread Peter Chen
On Wed, Jul 20, 2016 at 05:40:24PM +0800, Peter Chen wrote: > Add binding doc for generic power sequence library. > > Signed-off-by: Peter Chen <peter.c...@nxp.com> > Acked-by: Philipp Zabel <p.za...@pengutronix.de> > --- > .../bindings/power/pwrseq

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

2016-07-28 Thread Peter Chen
On Thu, Jul 28, 2016 at 08:56:40AM -0700, Joshua Clayton wrote: > Hi, Peter > > On 07/20/2016 02:40 AM, Peter Chen wrote: > > Hi all, > > > > This is a follow-up for my last power sequence framework patch set [1]. > > According to Rob Herring and Ulf Hanss

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

2016-07-27 Thread Peter Chen
On Wed, Jul 27, 2016 at 09:25:11AM -0700, Joshua Clayton wrote: > > > On 07/20/2016 02:40 AM, Peter Chen wrote: > > Some hard-wired USB devices need to do power sequence to let the > > device work normally, the typical power sequence like: enable USB > > PHY c

Re: [PATCH] usb: gadget: remove redundant self assignment

2016-07-27 Thread Peter Chen
-107,10 +107,8 @@ int usb_ep_enable(struct usb_ep *ep) > goto out; > > ret = ep->ops->enable(ep, ep->desc); > - if (ret) { > - ret = ret; > + if (ret) > goto out; > - } > > ep->enabled = true; >

[PATCH 1/1] usb: misc: usbtest: usbtest_do_ioctl may return positive integer

2016-07-26 Thread Peter Chen
. Signed-off-by: Peter Chen <peter.c...@nxp.com> Cc: stable <sta...@vger.kernel.org> Fixes: 18fc4ebdc705 ("usb: misc: usbtest: Remove timeval usage") --- drivers/usb/misc/usbtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/misc/usbtes

Re: [PATCH v3 5/6] usb: chipidea: let chipidea core device of_node equal's glue layer device of_node

2016-07-21 Thread Peter Chen
On Thu, Jul 21, 2016 at 10:41:28AM +0100, Russell King - ARM Linux wrote: > On Thu, Jul 21, 2016 at 05:20:12PM +0800, Peter Chen wrote: > > On Thu, Jul 21, 2016 at 10:14:38AM +0100, Russell King - ARM Linux wrote: > > > On Wed, Jul 20, 2016 at 05:40:28PM +0800, Peter Chen wrote:

Re: [PATCH v3 5/6] usb: chipidea: let chipidea core device of_node equal's glue layer device of_node

2016-07-21 Thread Peter Chen
On Thu, Jul 21, 2016 at 10:14:38AM +0100, Russell King - ARM Linux wrote: > On Wed, Jul 20, 2016 at 05:40:28PM +0800, Peter Chen wrote: > > diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c > > index 69426e6..0d05812 100644 > > --- a/drivers/usb/chip

Re: [PATCH v2 3/3] usb: chipidea: imx: set over current polarity per dts setting

2016-07-21 Thread Peter Chen
&= ~(MX6_BM_OVER_CUR_DIS | MX6_BM_OVER_CUR_POLARITY); > } > + writel(reg, usbmisc->base); > > reg = readl(usbmisc->base + MX7D_USBNC_USB_CTRL2); > reg &= ~MX7D_USB_VBUS_WAKEUP_SOURCE_MASK; > @@ -492,6 +500,10 @@ static const struct of_device_id usbmi

RE: Regarding the patch "let USB device know device node"

2016-07-20 Thread Peter Chen
>Hey Hi Peter, > >I hope you are doing good. > >We probably have similar usecase of yours as far as "let USB device know device >node" >is concerned. >we have a device, where HUB is connected to one of USB port, and due to lack of >control path from DT, it is always hard to maintain (manage) >2

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

2016-07-20 Thread Peter Chen
). 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 -- drivers/usb/core/hub.h| 12 ++ drivers/usb/core/pwrseq.c

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

2016-07-20 Thread Peter Chen
erties at dt binding - Should use structure not but its pointer for kzalloc - Since chipidea core has no of_node, let core's of_node equals glue layer's at core's probe Peter Chen (6): binding-doc: power: pwrseq-generic: add binding doc for generic power sequence library power: add power sequen

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

2016-07-20 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> --- MAINTAINERS | 9 ++ drivers/power/Kconfig

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

2016-07-20 Thread Peter Chen
Add binding doc for generic power sequence library. Signed-off-by: Peter Chen <peter.c...@nxp.com> Acked-by: Philipp Zabel <p.za...@pengutronix.de> --- .../bindings/power/pwrseq/pwrseq-generic.txt | 48 ++ 1 file changed, 48 insertions(+) create

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

2016-07-20 Thread 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, and power sequence properties are under it. Signed-off-by: Peter Chen <peter.c...@nxp.com> --- arch/arm/boot/dts/imx6qdl-udoo.dts

[PATCH v3 5/6] usb: chipidea: let chipidea core device of_node equal's glue layer device of_node

2016-07-20 Thread Peter Chen
From: Peter Chen <peter.c...@freescale.com> At device tree, we have no device node for chipidea core, the glue layer's node is the parent node for host and udc device. But in related driver, the parent device is chipidea core. So, in order to let the common driver get parent's node,

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

2016-07-20 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, 9 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/usb/usb-device.txt b/Documen

Re: [PATCH 4/4] usb: chipidea: imx: set over current polarity per dts setting

2016-07-18 Thread Peter Chen
On Tue, Jul 19, 2016 at 02:31:41AM +, Jun Li wrote: > Hi > > > -Original Message- > > From: Peter Chen [mailto:hzpeterc...@gmail.com] > > Sent: Tuesday, July 19, 2016 9:57 AM > > To: Jun Li <jun...@nxp.com> > > Cc: Peter Chen <peter

Re: [PATCH 4/4] usb: chipidea: imx: set over current polarity per dts setting

2016-07-18 Thread Peter Chen
); > reg &= ~MX7D_USB_VBUS_WAKEUP_SOURCE_MASK; > @@ -492,6 +508,10 @@ static const struct of_device_id usbmisc_imx_dt_ids[] = { > .compatible = "fsl,imx6ul-usbmisc", > .data = _usbmisc_ops, > }, > + { > + .compatible = "fsl,imx7d-usbmisc", > +

Re: [PATCH 2/4] doc: usb: ci-hdrc-usb2: add property over-current-polarity

2016-07-18 Thread Peter Chen
ility. > > If there is no magic happening in silicon (which would seem to be the case if > we can > handle inverting polarity in the driver), I would suggest going the gpiod > route. > -- 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/2] usb: chipidea: usbmisc: set over current polarity for imx6 and imx7

2016-07-18 Thread Peter Chen
On Mon, Jul 18, 2016 at 07:04:57AM +, Jun Li wrote: > Hi Peter, > > > -Original Message- > > From: Peter Chen [mailto:hzpeterc...@gmail.com] > > Sent: Friday, July 15, 2016 5:21 PM > > To: Jun Li <jun...@nxp.com> > > Cc: Peter Chen <p

Re: [PATCH V2] leds: trigger: Introduce an USB port trigger

2016-07-18 Thread Peter Chen
On Mon, Jul 18, 2016 at 07:57:34AM +0200, Rafał Miłecki wrote: > On 18 July 2016 at 07:40, Peter Chen <hzpeterc...@gmail.com> wrote: > > On Mon, Jul 18, 2016 at 06:44:49AM +0200, Rafał Miłecki wrote: > >> On 18 July 2016 at 04:31, Peter Chen <hzpeterc...@gmail.com>

Re: [PATCH V2] leds: trigger: Introduce an USB port trigger

2016-07-17 Thread Peter Chen
On Mon, Jul 18, 2016 at 06:44:49AM +0200, Rafał Miłecki wrote: > On 18 July 2016 at 04:31, Peter Chen <hzpeterc...@gmail.com> wrote: > > On Fri, Jul 15, 2016 at 11:10:45PM +0200, Rafał Miłecki wrote: > >> + > >> +usbport trigger: > >> +- usb-ports : List

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

2016-07-17 Thread Peter Chen
On Sat, Jul 16, 2016 at 05:30:57PM -0500, Rob Herring wrote: > On Wed, Jul 13, 2016 at 10:06:45AM +0800, Peter Chen wrote: > > Add binding doc for generic power sequence library. > > I'd written a review on last version, but forgot to send it out. Anyway, > I mostly had

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

2016-07-17 Thread Peter Chen
On Sat, Jul 16, 2016 at 05:31:59PM -0500, Rob Herring wrote: > On Wed, Jul 13, 2016 at 10:06:47AM +0800, Peter Chen wrote: > > Add optional properties for power sequence. > > > > Signed-off-by: Peter Chen <peter.c...@nxp.com> > > --- > > Documentation/dev

Re: [PATCH V2] leds: trigger: Introduce an USB port trigger

2016-07-17 Thread Peter Chen
+ * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License as published by > + * the Free Software Foundation; either version 2 of the License, or (at > + * your option) any later version. > + */ GPL v2 only.

Re: [patch] usb: gadget: fsl_qe_udc: signedness bug in qe_get_frame()

2016-07-17 Thread Peter Chen
; > tmp = in_be16(>usb_param->frame_n); > if (tmp & 0x8000) > - tmp = tmp & 0x07ff; > - else > - tmp = -EINVAL; > - > - return (int)tmp; > + return tmp & 0x07ff; > + return -EINVAL; > } Acked

Re: [PATCH 2/2] usb: chipidea: usbmisc: set over current polarity for imx6 and imx7

2016-07-15 Thread Peter Chen
On Fri, Jul 15, 2016 at 07:38:23AM +, Jun Li wrote: > Hi, > > -Original Message- > > From: Peter Chen [mailto:hzpeterc...@gmail.com] > > Sent: Friday, July 15, 2016 3:02 PM > > To: Jun Li <jun...@nxp.com> > > Cc: Peter Chen <peter.c...@nxp.c

Re: [PATCH v2 2/5] usb: DT binding documentation for qoriq usb 2.0 controller

2016-07-15 Thread Peter Chen
On Tue, Jul 12, 2016 at 03:59:14AM +, Rajesh Bhagat wrote: > > > > -Original Message- > > From: Peter Chen [mailto:hzpeterc...@gmail.com] > > Sent: Monday, July 11, 2016 12:19 PM > > To: Rajesh Bhagat <rajesh.bha...@nxp.com> > >

Re: [PATCH v2 1/5] drivers: usb: chipidea: Add qoriq platform driver

2016-07-15 Thread Peter Chen
> > We do have multiple clocks, but currently one is integrated in code. Hence > created > the APIs for future use. If you could not integrate one more clocks, I suggest not creating dedicated API until you need in future. -- Best Regards, Peter Chen -- To unsubscribe fr

Re: [PATCH 2/2] usb: chipidea: usbmisc: set over current polarity for imx6 and imx7

2016-07-15 Thread Peter Chen
gt; reg = readl(usbmisc->base + MX7D_USBNC_USB_CTRL2); > @@ -492,6 +502,10 @@ static const struct of_device_id usbmisc_imx_dt_ids[] = { > .compatible = "fsl,imx6ul-usbmisc", > .data = _usbmisc_ops, > }, > + { > +

Re: [patch] usb: gadget: fsl_qe_udc: off by one in setup_received_handle()

2016-07-15 Thread Peter Chen
break; > ep = >eps[pipe]; > Acked-by: Peter Chen <peter.c...@nxp.com> -- 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 V2 0/1] usb: add HCD providers

2016-07-15 Thread Peter Chen
.np, "reg", ); > >> if (args.np->parent == usb_dev->bus->controller->of_node && > >> port == usb_dev->portnum) { > >> of_node_put(args.np); > >> return true; > >> } > >> of_nod

Re: bug 120981 - usb controller reset / disconnect -

2016-07-14 Thread Peter Chen
ng: echo "file drivers/usb/* +p" > /sys/kernel/debug/dynamic_debug/control -- 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 V2 0/1] usb: add HCD providers

2016-07-14 Thread Peter Chen
On Thu, Jul 14, 2016 at 05:52:43PM +0200, Rafał Miłecki wrote: > On 14 July 2016 at 11:48, Peter Chen <hzpeterc...@gmail.com> wrote: > > On Wed, Jul 13, 2016 at 04:40:53PM +0200, Rafał Miłecki wrote: > >> On 13 July 2016 at 15:50, Felipe Balbi <felipe.ba...@l

Re: [PATCH V2 0/1] usb: add HCD providers

2016-07-14 Thread Peter Chen
wo buses. Below I supply another thought, please check if it is feasible. In below design, you don't need to change any usb codes. dts: led_1 { led_gpio_1; usb_port = _port0, _port1; } led_2 { led_gpio_2; usb_port = _port0, _port1; } ohci@1000 { compatible = "generic-ohci"; reg = <0x1000 0x1000>; interrupts = ; ohci_port0: port@0 { reg = <0>; }; ohci_port1: port@1 { reg = <1>; }; }; ehci@2000 { compatible = "generic-ehci"; reg = <0x2000 0x1000>; interrupts = ; ehci_port0: port@0 { reg = <0>; }; ehci_port1: port@1 { reg = <1>; }; }; xhci@3000 { compatible = "generic-xhci"; reg = <0x3000 0x1000>; interrupts = ; /* for xhci, port 0 - [N-1] is USB3, N - [M-1] is USB2/1. * The port 0 and port N is the same physical port */ xhci_port0: port@0 { reg = <0>; }; xhci_port1: port@1 { reg = <1>; }; }; At code, compare the usb_device's device_node at usbport_trig_notify if it is at led_1's usb device list, light on it. -- 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 v2 1/6] binding-doc: power: pwrseq-generic: add binding doc for generic power sequence library

2016-07-14 Thread Peter Chen
On Wed, Jul 13, 2016 at 04:20:06PM -0700, Joshua Clayton wrote: > > > On 07/13/2016 01:42 AM, Peter Chen wrote: > > On Wed, Jul 13, 2016 at 09:27:31AM +0200, Philipp Zabel wrote: > >> Am Mittwoch, den 13.07.2016, 10:06 +0800 schrieb Peter Chen: > >>> Add bi

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

2016-07-13 Thread Peter Chen
On Wed, Jul 13, 2016 at 09:27:31AM +0200, Philipp Zabel wrote: > Am Mittwoch, den 13.07.2016, 10:06 +0800 schrieb Peter Chen: > > Add binding doc for generic power sequence library. > > > > Signed-off-by: Peter Chen <peter.c...@nxp.com> > > --- > > .../b

Re: [PATCH 0/2] usb: add HCD providers

2016-07-13 Thread Peter Chen
On Wed, Jul 13, 2016 at 07:21:09AM +0200, Rafał Miłecki wrote: > On 13 July 2016 at 06:51, Peter Chen <hzpeterc...@gmail.com> wrote: > > On Tue, Jul 12, 2016 at 02:35:18PM +0200, Rafał Miłecki wrote: > >> I was working on an "usbport" LED trigger driver and speci

Re: [PATCH 0/2] usb: add HCD providers

2016-07-12 Thread Peter Chen
; 4 files changed, 128 insertions(+) > create mode 100644 drivers/usb/core/provider.c > create mode 100644 include/linux/usb/provider.h > > -- > 1.8.4.5 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-usb" in > the body of a message to

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

2016-07-12 Thread Peter Chen
pidea core has no of_node, let core's of_node equals glue layer's at core's probe Peter Chen (6): binding-doc: power: pwrseq-generic: add binding doc for generic power sequence library power: add power sequence library binding-doc: usb: usb-device: add optional properties for power

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

2016-07-12 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 v2 4/6] usb: core: add power sequence handling for USB devices

2016-07-12 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 v2 6/6] ARM: dts: imx6qdl-udoo.dtsi: fix onboard USB HUB property

2016-07-12 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

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

2016-07-12 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 | 9 + 1 file changed, 9 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/usb-device.txt b/Documentation/devi

[PATCH v2 5/6] usb: chipidea: let chipidea core device of_node equal's glue layer device of_node

2016-07-12 Thread Peter Chen
From: Peter Chen <peter.c...@freescale.com> At device tree, we have no device node for chipidea core, the glue layer's node is the parent node for host and udc device. But in related driver, the parent device is chipidea core. So, in order to let the common driver get parent's node,

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

2016-07-11 Thread Peter Chen
On Mon, Jul 11, 2016 at 03:07:24PM -0700, Stephen Boyd wrote: > On 10 July 2016 at 22:32, Peter Chen <hzpeterc...@gmail.com> wrote: > > On Thu, Jul 07, 2016 at 03:21:09PM -0700, Stephen Boyd wrote: > >> @@ -40,11 +43,38 @@ struct ci_hdrc_msm { > >> struct

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

2016-07-11 Thread Peter Chen
On Mon, Jul 11, 2016 at 03:03:37PM -0700, Stephen Boyd wrote: > On 10 July 2016 at 21:43, Peter Chen <hzpeterc...@gmail.com> wrote: > > On Thu, Jul 07, 2016 at 03:21:06PM -0700, Stephen Boyd wrote: > >> diff --git a/drivers/usb/chipidea/ci_hdrc_msm.c > >> b/d

Re: [PATCH 3/3] usb: chipidea: udc: Use direction flags consequently

2016-07-11 Thread Peter Chen
num = le16_to_cpu(req.wIndex); > dir = num & USB_ENDPOINT_DIR_MASK; > num &= USB_ENDPOINT_NUMBER_MASK; > - if (dir) /* TX */ > + if (dir == TX) > num += ci->hw_ep_max / 2;

Re: [PATCH v2 3/5] drivers: usb: phy: Add qoriq usb 2.0 phy driver support

2016-07-11 Thread Peter Chen
-usb2.h > @@ -0,0 +1,50 @@ > +/* > + * Freescale SoC USB 2.0 PHY driver > + * > + * Copyright 2016 Freescale Semiconductor, Inc. > + * Author: Rajesh Bhagat <rajesh.bha...@nxp.com> > + * > + * This program is free software; you can redistribute it and/or modify

Re: [PATCH v2 2/5] usb: DT binding documentation for qoriq usb 2.0 controller

2016-07-11 Thread Peter Chen
4>; > + phy-names = "usb2-phy"; > + phys = <>; > + clock-names = "usb2-clock"; > + clocks = < 4 3>; > + dr_mode = "host"; > + phy_type = "ulpi"; > +}; > -- > 2.6.2.198.g614a2ac > > --

Re: [PATCH v2 1/5] drivers: usb: chipidea: Add qoriq platform driver

2016-07-11 Thread Peter Chen
ne USBGENCTRL_PFP (1 << 2) > +#define QORIQ_SOC_USB_ISIPHYCTRL 0x204 > +#define ISIPHYCTRL_PXE (1) > +#define ISIPHYCTRL_PHYE (1 << 4) > + > +#define QORIQ_SOC_USB_SNOOP1 0x400 /* NOTE: big-endian */ > +#define QORI

Re: [PATCH 0/3] usb: chipidea: Improvements to UDC

2016-07-11 Thread Peter Chen
sertions(+), 15 deletions(-) > Thanks, will queue them. -- 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: gadget: fix check in sync read from ep in gadgetfs

2016-07-10 Thread Peter Chen
alue)) > > value = -EFAULT; > > } else { > > struct kiocb_priv *priv = kzalloc(sizeof *priv, GFP_KERNEL); > > -- > > 2.7.4 > > > -- > To unsubscribe from this list: send the line "unsubscribe linux

Re: [PATCH v2 19/22] usb: chipidea: msm: Handle phy power states

2016-07-10 Thread Peter Chen
to the RESET event and the phy power off > into the STOPPED event. > > Cc: Peter Chen <peter.c...@nxp.com> > Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> > --- > drivers/usb/chipidea/ci_hdrc_msm.c | 40 > +++--- > drivers/usb

Re: [PATCH v2 20/22] usb: chipidea: msm: Be silent on probe defer errors

2016-07-10 Thread Peter Chen
On Thu, Jul 07, 2016 at 03:21:11PM -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 v2 18/22] usb: chipidea: msm: Add reset controller for PHY POR bit

2016-07-10 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/Kconfig | 1 + > drivers/usb/chipidea/ci_hdrc_msm.c

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

2016-07-10 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 v2 16/22] usb: chipidea: msm: Restore wrapper settings after reset

2016-07-10 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 v2 15/22] usb: chipidea: msm: Mux over secondary phy at the right time

2016-07-10 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. > > Cc: Peter Chen <peter.c...@nxp.com> > Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> > Signed-off-by: Stephen Boyd <stephen.b

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

2016-07-10 Thread Peter Chen
; clks to be enabled to propagate resets. > > 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 | 72 >

Re: [PATCH v2 12/22] usb: chipidea: msm: Rely on core to override AHBBURST

2016-07-10 Thread Peter Chen
a devices so setting the flag in the driver > works just as well. You may need to mention if the platform needs to set value rather than 0, it needs to "ahb-burst-config" at dts, others are ok. Acked-by: Peter Chen <peter.c...@nxp.com> > > Cc: Peter Chen <peter.c..

Re: [PATCH v2 11/22] usb: chipidea: msm: Mark device as runtime pm active

2016-07-10 Thread Peter Chen
e glue layer has a power domain > associated with it, because runtime PM will go and disable the > power domain to match the 'inactive' state of the device. Let's > mark the device as active so that runtime PM doesn't improperly > power down this device when it's actually active. >

Re: [PATCH v2 10/22] usb: chipidea: Add support for ULPI PHY bus

2016-07-10 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 v2 09/22] usb: chipidea: Kick OTG state machine for AVVIS with vbus extcon

2016-07-10 Thread Peter Chen
iate OTG fsm bits and kicking the state > machine again. > > Cc: Peter Chen <peter.c...@nxp.com> > Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> > Signed-off-by: Stephen Boyd <stephen.b...@linaro.org> > --- > > I think this was rejected last ti

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

2016-07-10 Thread Peter Chen
The udc device needs to be deleted if error occurs Fixes: 855ed04a3758 ("usb: gadget: udc-core: independent registration of gadgets and gadget drivers") Signed-off-by: Peter Chen <peter.c...@nxp.com> --- Changes for v2: - Reformat the "Fixes" description i

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

2016-07-10 Thread Peter Chen
On Fri, Jul 08, 2016 at 01:28:57PM +0300, Felipe Balbi wrote: > > Hi, > > Peter Chen <peter.c...@nxp.com> writes: > > The udc device needs to be deleted if error occurs > > > > Fixes: 855ed04a (usb: gadget: udc-core: independent registration of gadget

Re: [PATCH v2 08/22] usb: chipidea: Remove locking in ci_udc_start()

2016-07-08 Thread Peter Chen
t() from within the CI_HDRC_CONTROLLER_RESET_EVENT hook. > > 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/udc.c | 3 --- > 1 file changed, 3 delet

Re: [PATCH v2 07/22] usb: chipidea: Notify events when switching host mode

2016-07-08 Thread Peter Chen
role after we toggle that bit. > > Similarly, the intent of the stopped event is to allow the > wrapper driver to do any wrapper specific things after the device > is stopped. So when we stop the host role, send the stopped > event. > > Cc: Peter Chen <peter.c...@nxp.com> >

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