RE: [PATCH] ARM: dts: imx6sx-sdb: Remove cpufreq OPP override

2017-04-26 Thread Peter Chen
> >The board file for imx6sx-dbg overrides cpufreq operating points to use higher >voltages. This is done because the board has a shared rail for VDD_ARM_IN and >VDD_SOC_IN and when using LDO bypass the shared voltage needs to be a value >suitable for both ARM and SOC. > >This was introduced in:

Re: [PATCH] usb: chipidea: udc: fix NULL pointer dereference if udc_start failed

2017-04-26 Thread Peter Chen
On Wed, Apr 26, 2017 at 04:25:26PM +0800, Jisheng Zhang wrote: > On Tue, 25 Apr 2017 17:21:59 +0200 > Stefan Wahren wrote: > > > Am 25.04.2017 um 11:20 schrieb Peter Chen: > > > > > >>>> diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/

Re: [PATCH] usb: chipidea: properly handle host or gadget initialization failure

2017-04-26 Thread Peter Chen
goto stop; + goto deinit_gadget; } } @@ -1075,7 +1075,7 @@ static int ci_hdrc_probe(struct platform_device *pdev) remove_debug: dbg_remove_files(ci); stop: - if (ci->is_otg) + if (ci->is_otg && ci->roles[CI_ROLE_GADGET]) ci_hdrc_otg_destroy(ci); deinit_gadget: ci_hdrc_gadget_destroy(ci); -- Best Regards, Peter Chen

RE: [PATCH] usb: chipidea: udc: fix NULL pointer dereference if udc_start failed

2017-04-25 Thread Peter Chen
>> > diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c >> > index f88e9157fad0..60a786c87c06 100644 >> > --- a/drivers/usb/chipidea/udc.c >> > +++ b/drivers/usb/chipidea/udc.c >> > @@ -1984,6 +1984,7 @@ static void udc_id_switch_for_host(struct >> > ci_hdrc *ci) int ci_hdrc_ga

Re: [PATCH] usb: chipidea: udc: fix NULL pointer dereference if udc_start failed

2017-04-25 Thread Peter Chen
ET] = rdrv; > > - return udc_start(ci); > + ret = udc_start(ci); > + if (!ret) > + ci->roles[CI_ROLE_GADGET] = rdrv; > + > + return ret; > } > -- Thanks for fixing it. In fact, we'd better return failure if ret && ret != -ENXIO at probe, it stands for initialization for host or gadget has failed. -- Best Regards, Peter Chen

Re: [PATCH] usb: chipidea: Fix missing resume call after suspend

2017-04-25 Thread Peter Chen
On Mon, Apr 24, 2017 at 01:25:21PM +, Bernhard Walle wrote: > Hi, > > > Peter Chen hat am 24. April 2017 um 05:51 geschrieben: > > > > > The current code logic is: > > - When the resume is received from host, the ci->dirver->resume is > > cal

Re: [PATCH] usb: chipidea: Fix missing resume call after suspend

2017-04-23 Thread Peter Chen
is called, so ci->driver->resume doesn't need to be called. There is a patch to fix clear suspended even the ci->driver->resume is NULL at v4.12-rc1. usb: chipidea: udc: update gadget state after bus resume -- Best Regards, Peter Chen

Re: [RFC] usb-phy-generic: Add support to SMSC USB3315

2017-04-20 Thread Peter Chen
itialization path. > > A new compatible string "smsc,usb3315" is used to decide which > initialization path to use. > Hi Peter, This is an ULPI PHY, so it is not suitable using generic USB PHY. Taking a look of drivers/phy/phy-qcom-usb-hs.c, you may have some clues. Pete

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

2017-04-17 Thread Peter Chen
b/drivers/usb/gadget/udc/core.c > @@ -139,10 +139,8 @@ int usb_ep_disable(struct usb_ep *ep) > goto out; > > ret = ep->ops->disable(ep); > - if (ret) { > - ret = ret; > + if (ret) > goto out; > - } > > ep->enabled = false; > Reviewed-by: Peter Chen -- Best Regards, Peter Chen

Re: [PATCH] chipidea: Fix issue in reconnecing gadget without insmod/rmmod

2017-04-14 Thread Peter Chen
isconnected. > > > > You don't need to use above two methods together, I suggest using the > > 2nd method since OTG FSM is hard to maintain due to no mandatory use > > case for it. > > > > -- > > > > Best Regards, > > Peter Chen > &

Re: [PATCH] chipidea: Fix issue in reconnecing gadget without insmod/rmmod

2017-04-12 Thread Peter Chen
SM, and using sysfs entries under /sys/bus/platform/devices/ci_hdrc.0/inputs but you may need to patch code to keep vbus always on for A-device, it is not compliance with OTG spec. - Using role interface under debugfs (I move it under sysfs for v4.12). But you need to patch the code and let the A-device switch back to host after iAP is disconnected. You don't need to use above two methods together, I suggest using the 2nd method since OTG FSM is hard to maintain due to no mandatory use case for it. -- Best Regards, Peter Chen

Re: [PATCH v17 2/3] usb: USB Type-C connector class

2017-03-08 Thread Peter Chen
On Wed, Mar 08, 2017 at 06:44:47AM -0800, Guenter Roeck wrote: > On 03/07/2017 10:50 PM, Peter Chen wrote: > > > >>>>You mean type-C trigger an ACPI event, and this ACPI event can notify > >>>>related USB controller driver doing role switch? > >&

RE: [PATCH v17 2/3] usb: USB Type-C connector class

2017-03-07 Thread Peter Chen
>>> You mean type-C trigger an ACPI event, and this ACPI event can notify >>> related USB controller driver doing role switch? >> >> No (firmware programs the dual-role hw/registers), but never mind. >> That could be the case. >> >>> If it is correct, there is a notifier between type-C and USB >>

RE: [PATCH v17 2/3] usb: USB Type-C connector class

2017-03-07 Thread Peter Chen
> >On Mon, Mar 06, 2017 at 09:15:51AM +0800, Peter Chen wrote: >> > > What interface you use when you receive this event to handle >> > > dual-role switch? I am wonder if a common dual-role class is >> > > needed, then we can have a common user uti

Re: [PATCH v17 2/3] usb: USB Type-C connector class

2017-03-05 Thread Peter Chen
On Fri, Mar 03, 2017 at 06:36:50AM -0800, Guenter Roeck wrote: > On 03/02/2017 08:52 PM, Peter Chen wrote: > >On Thu, Mar 02, 2017 at 08:29:07PM -0800, Guenter Roeck wrote: > >>On 03/02/2017 07:35 PM, Peter Chen wrote: > >>>On Tue, Feb 21, 2017 at 05:24:04P

Re: [PATCH v17 2/3] usb: USB Type-C connector class

2017-03-05 Thread Peter Chen
On Fri, Mar 03, 2017 at 04:31:33PM +0200, Heikki Krogerus wrote: > Hi Peter, > > On Fri, Mar 03, 2017 at 11:35:29AM +0800, Peter Chen wrote: > > On Tue, Feb 21, 2017 at 05:24:04PM +0300, Heikki Krogerus wrote: > > > +/* --- */ >

Re: [PATCH v17 2/3] usb: USB Type-C connector class

2017-03-03 Thread Peter Chen
usb-dual-role/role Maybe we can enhance Roger's drd framework [1] to fulfill that. [1] https://lwn.net/Articles/682531/ -- Best Regards, Peter Chen

Re: [PATCH v17 2/3] usb: USB Type-C connector class

2017-03-03 Thread Peter Chen
On Thu, Mar 02, 2017 at 08:29:07PM -0800, Guenter Roeck wrote: > On 03/02/2017 07:35 PM, Peter Chen wrote: > >On Tue, Feb 21, 2017 at 05:24:04PM +0300, Heikki Krogerus wrote: > >>+/* --- */ > >>+/* Driver callb

Re: [LKP] [usb] bea5b158ff WARNING: CPU: 0 PID: 25 at drivers/usb/core/urb.c:338 usb_submit_urb

2017-02-27 Thread Peter Chen
On Tue, Feb 28, 2017 at 12:32:55PM +0800, Ye Xiaolong wrote: > On 02/28, Ye Xiaolong wrote: > >On 02/27, Peter Chen wrote: > >>On Sun, Feb 26, 2017 at 06:19:59PM +0800, Fengguang Wu wrote: > >>> [Sorry, resend to correct Felipe's email address] > >>>

Re: [usb] bea5b158ff WARNING: CPU: 0 PID: 25 at drivers/usb/core/urb.c:338 usb_submit_urb

2017-02-27 Thread Peter Chen
On Sun, Feb 26, 2017 at 06:19:59PM +0800, Fengguang Wu wrote: > [Sorry, resend to correct Felipe's email address] > > Greetings, > > This debug patch possibly discloses some USB/I2C bugs. Since the USB > warning shows up earlier in dmesg, it might also be the root cause of > the I2C bug. The atta

Re: [PATCH v2 4/4] usb: dwc3: Workaround for super-speed host on dra7 in dual-role mode

2017-02-23 Thread Peter Chen
con_get_edev_by_phandle(dev, 0); > > Don't we want separate edev's for vbus and id ? > One can have separate pins connected to them and in that case > we can't get the events out of one pin only. > Current extcon-usb-gpio driver supports id and vbus at the same time, that means there are two optional gpios under one extcon node. -- Best Regards, Peter Chen

Re: [PATCH v13 06/12] usb: xhci: use bus->sysdev for DMA configuration

2017-02-15 Thread Peter Chen
for xhci on the fly and set the DT > >>> properties. > >>> > >> > >> By readying code, the dwc3 calls dwc3_get_properties to set > >> dwc->usb3_lpm_capable, and at dwc3/host.c, it sets property > >> "usb3-lpm-capable" according to this flag, why not let common > >> code xhci-plat.c to get this property from sysdev which is DT > >> nodes for dwc3? > >> > > > > Felipe, any comments? > > Won't work. We have quirk flags which are based on DWC3's revision which > is not accessible by xhci-plat. Also, we can't call > device_add_property() because it's not really *adding*. It's *setting*, > meaning that we would loose all other properties. > Sorry, I am not clear by reading the code, here we just discuss "usb3-lpm-capable" property from DT or other firmwares. -- Best Regards, Peter Chen

Re: [PATCH v13 06/12] usb: xhci: use bus->sysdev for DMA configuration

2017-02-15 Thread Peter Chen
On Wed, Feb 15, 2017 at 10:18:03AM +0200, Roger Quadros wrote: > Peter, > > On 15/02/17 03:35, Peter Chen wrote: > > On Tue, Feb 14, 2017 at 01:58:40PM +0100, Arnd Bergmann wrote: > >> On Tue, Feb 14, 2017 at 1:26 PM, Roger Quadros wrote: > >>> On 14/02/17 1

Re: [PATCH v13 00/12] power: add power sequence library

2017-02-14 Thread Peter Chen
On Tue, Feb 14, 2017 at 12:21:48PM +0200, Roger Quadros wrote: > Peter, > > On 11/02/17 03:27, 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 Hansson's commen

Re: [PATCH v13 06/12] usb: xhci: use bus->sysdev for DMA configuration

2017-02-14 Thread Peter Chen
ng "usb3-lpm-capable" at firmware directly? Peter > > Hmm, ideally we would only have properties on one of the two, since we > refer to the sysdev for the properties regarding DMA and PHY among other > things, but I guess that's not an option here, since we can't call > platform_device_add_properties() on a dwc_pci device and have to > use the xhci pdev instead. > > Arnd > -- Best Regards, Peter Chen

RE: [PATCH v7 5/5] usb: doc: add document for USB3 debug port usage

2017-02-13 Thread Peter Chen
> >On 02/14/2017 11:45 AM, Peter Chen wrote: >> On Tue, Feb 14, 2017 at 10:27 AM, Lu Baolu wrote: >> >>> Add Documentation/usb/usb3-debug-port.rst. This document includes the >>> user guide for USB3 debug port. >>> >>> Cc:

Re: [PATCH] usb: misc: usbtest: remove redundant check on retval < 0

2017-02-13 Thread Peter Chen
fine */ > } else if (retval != sizeof(struct usb_qualifier_descriptor)) { Reviewed-by: Peter Chen -- Best Regards, Peter Chen

[PATCH 1/1] extcon: ext-usb-gpio: do not enable USB as wakeup source by default

2017-02-13 Thread Peter Chen
Whether the USB port as a wakeup source should be determined by user, but not enabled by default. Signed-off-by: Peter Chen --- drivers/extcon/extcon-usb-gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/extcon/extcon-usb-gpio.c b/drivers/extcon/extcon-usb

[PATCH v13 07/12] usb: ehci: use bus->sysdev for DMA configuration

2017-02-10 Thread Peter Chen
Set the dma for ehci from sysdev. The sysdev is pointing to device that is known to the system firmware or hardware. Cc: Arnd Bergmann Cc: Sriram Dash Signed-off-by: Peter Chen Acked-by: Alan Stern --- drivers/usb/host/ehci-mem.c | 12 ++-- 1 file changed, 6 insertions(+), 6

[PATCH v13 06/12] usb: xhci: use bus->sysdev for DMA configuration

2017-02-10 Thread Peter Chen
From: Arnd Bergmann For xhci-hcd platform device, all the DMA parameters are not configured properly, notably dma ops for dwc3 devices. So, set the dma for xhci from sysdev. sysdev is pointing to device that is known to the system firmware or hardware. Cc: Baolin Wang Cc: Vivek Gautam Cc: Alex

[PATCH v13 10/12] ARM: dts: imx6qdl: Enable usb node children with

2017-02-10 Thread Peter Chen
From: Joshua Clayton Give usb nodes #address and #size attributes, so that a child node representing a permanently connected device such as an onboard hub may be addressed with a attribute Signed-off-by: Joshua Clayton Signed-off-by: Peter Chen --- arch/arm/boot/dts/imx6qdl.dtsi | 6

[PATCH v13 02/12] power: add power sequence library

2017-02-10 Thread Peter Chen
instead (eg, USB hub driver). For new power sequence library, it can add its compatible string to pwrseq_of_match_table, then the pwrseq core will match it with DT's, and choose this library at runtime. Signed-off-by: Peter Chen Tested-by: Maciej S. Szmigiero Tested-by Joshua Clayton Review

[PATCH v13 00/12] power: add power sequence library

2017-02-10 Thread Peter Chen
shua Clayton (2): ARM: dts: imx6qdl: Enable usb node children with ARM: dts: imx6q-evi: Fix onboard hub reset line Peter Chen (6): binding-doc: power: pwrseq-generic: add binding doc for generic power sequence library power: add power sequence library usb: ehci: use bus->sysdev f

[PATCH v13 12/12] ARM: dts: imx6q-evi: Fix onboard hub reset line

2017-02-10 Thread Peter Chen
From: Joshua Clayton Previously the onboard hub was made to work by treating its reset gpio as a regulator enable. Get rid of that kludge now that pwseq has added reset gpio support Move pin muxing the hub reset pin into the usbh1 group Signed-off-by: Joshua Clayton Signed-off-by: Peter Chen

[PATCH v13 03/12] usb: separate out sysdev pointer from usb_bus

2017-02-10 Thread Peter Chen
lbi Cc: Grygorii Strashko Cc: Sinjan Kumar Cc: David Fisher Cc: Catalin Marinas Cc: "Thang Q. Nguyen" Cc: Yoshihiro Shimoda Cc: Stephen Boyd Cc: Bjorn Andersson Cc: Ming Lei Cc: Jon Masters Cc: Dann Frazier Cc: Peter Chen Cc: Leo Li --- drivers/usb/core/buffer.c | 12 +++

[PATCH v13 04/12] usb: chipidea: use bus->sysdev for DMA configuration

2017-02-10 Thread Peter Chen
From: Arnd Bergmann Set the dma for chipidea from sysdev. This is inherited from its parent node. Also, do not set dma mask for child as it is not required now. Signed-off-by: Arnd Bergmann Signed-off-by: Sriram Dash Acked-by: Peter Chen Signed-off-by: Mathias Nyman --- drivers/usb

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

2017-02-10 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. Besides, using gpio pinctrl setting for USB2415's reset pin. Signed-off-by: Peter Chen

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

2017-02-10 Thread Peter Chen
t. Signed-off-by: Peter Chen Tested-by Joshua Clayton Tested-by: Maciej S. Szmigiero Reviewed-by: Vaibhav Hiremath --- drivers/usb/Kconfig| 1 + drivers/usb/core/hub.c | 49 + drivers/usb/core/hub.h | 1 + 3 files changed, 47 insertions(+), 4

[PATCH v13 05/12] usb: ehci: fsl: use bus->sysdev for DMA configuration

2017-02-10 Thread Peter Chen
From: Arnd Bergmann For the dual role ehci fsl driver, sysdev will handle the dma config. Signed-off-by: Arnd Bergmann Signed-off-by: Sriram Dash Signed-off-by: Mathias Nyman --- drivers/usb/host/ehci-fsl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/h

[PATCH v13 01/12] binding-doc: power: pwrseq-generic: add binding doc for generic power sequence library

2017-02-10 Thread Peter Chen
Add binding doc for generic power sequence library. Signed-off-by: Peter Chen Acked-by: Philipp Zabel Acked-by: Rob Herring --- .../bindings/power/pwrseq/pwrseq-generic.txt | 48 ++ 1 file changed, 48 insertions(+) create mode 100644 Documentation/devicetree

[PATCH v13 08/12] binding-doc: usb: usb-device: add optional properties for power sequence

2017-02-10 Thread Peter Chen
Add optional properties for power sequence. Signed-off-by: Peter Chen Acked-by: Rob Herring --- 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

Re: [PATCH v12 6/9] usb: xhci: use bus->sysdev for DMA configuration

2017-02-09 Thread Peter Chen
Sriram, Arnd, > >>> > >>> On Mon, Feb 06, 2017 at 05:13:38PM +0800, Peter Chen wrote: > >>>> From: Arnd Bergmann > >>>> > >>>> For xhci-hcd platform device, all the DMA parameters are not > >>>> configured properly

Re: [PATCH v12 6/9] usb: xhci: use bus->sysdev for DMA configuration

2017-02-08 Thread Peter Chen
On Wed, Feb 08, 2017 at 05:27:31PM +0530, Vivek Gautam wrote: > Hi, > > > On Mon, Feb 6, 2017 at 2:43 PM, Peter Chen wrote: > > From: Arnd Bergmann > > > > For xhci-hcd platform device, all the DMA parameters are not > > configured properly, notably dma o

Re: [PATCH v12 6/9] usb: xhci: use bus->sysdev for DMA configuration

2017-02-08 Thread Peter Chen
On Wed, Feb 08, 2017 at 12:43:00PM -0800, Jack Pham wrote: > Hi Peter, Sriram, Arnd, > > On Mon, Feb 06, 2017 at 05:13:38PM +0800, Peter Chen wrote: > > From: Arnd Bergmann > > > > For xhci-hcd platform device, all the DMA parameters are not > > configured p

[PATCH v12 0/9] power: add power sequence library

2017-02-06 Thread Peter Chen
ux-usb/msg152375.html Arnd Bergmann (4): usb: separate out sysdev pointer from usb_bus usb: chipidea: use bus->sysdev for DMA configuration usb: ehci: fsl: use bus->sysdev for DMA configuration usb: xhci: use bus->sysdev for DMA configuration Peter Chen (5): binding-doc: power:

[PATCH v12 5/9] usb: ehci: fsl: use bus->sysdev for DMA configuration

2017-02-06 Thread Peter Chen
From: Arnd Bergmann For the dual role ehci fsl driver, sysdev will handle the dma config. Signed-off-by: Arnd Bergmann Signed-off-by: Sriram Dash Signed-off-by: Mathias Nyman --- drivers/usb/host/ehci-fsl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/h

[PATCH v12 8/9] binding-doc: usb: usb-device: add optional properties for power sequence

2017-02-06 Thread Peter Chen
Add optional properties for power sequence. Signed-off-by: Peter Chen Acked-by: Rob Herring --- 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

[PATCH v12 9/9] usb: core: add power sequence handling for USB devices

2017-02-06 Thread Peter Chen
t. Signed-off-by: Peter Chen Tested-by Joshua Clayton Tested-by: Maciej S. Szmigiero Reviewed-by: Vaibhav Hiremath --- drivers/usb/Kconfig| 1 + drivers/usb/core/hub.c | 49 + drivers/usb/core/hub.h | 1 + 3 files changed, 47 insertions(+), 4

[PATCH v12 6/9] usb: xhci: use bus->sysdev for DMA configuration

2017-02-06 Thread Peter Chen
From: Arnd Bergmann For xhci-hcd platform device, all the DMA parameters are not configured properly, notably dma ops for dwc3 devices. So, set the dma for xhci from sysdev. sysdev is pointing to device that is known to the system firmware or hardware. Signed-off-by: Arnd Bergmann Signed-off-by

[PATCH v12 7/9] usb: ehci: use bus->sysdev for DMA configuration

2017-02-06 Thread Peter Chen
Set the dma for ehci from sysdev. The sysdev is pointing to device that is known to the system firmware or hardware. Cc: Arnd Bergmann Cc: Sriram Dash Signed-off-by: Peter Chen --- drivers/usb/host/ehci-mem.c | 38 +++--- 1 file changed, 19 insertions(+), 19

[PATCH v12 3/9] usb: separate out sysdev pointer from usb_bus

2017-02-06 Thread Peter Chen
lbi Cc: Grygorii Strashko Cc: Sinjan Kumar Cc: David Fisher Cc: Catalin Marinas Cc: "Thang Q. Nguyen" Cc: Yoshihiro Shimoda Cc: Stephen Boyd Cc: Bjorn Andersson Cc: Ming Lei Cc: Jon Masters Cc: Dann Frazier Cc: Peter Chen Cc: Leo Li --- drivers/usb/core/buffer.c | 12 ++--

[PATCH v12 4/9] usb: chipidea: use bus->sysdev for DMA configuration

2017-02-06 Thread Peter Chen
From: Arnd Bergmann Set the dma for chipidea from sysdev. This is inherited from its parent node. Also, do not set dma mask for child as it is not required now. Signed-off-by: Arnd Bergmann Signed-off-by: Sriram Dash Acked-by: Peter Chen Signed-off-by: Mathias Nyman --- drivers/usb

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

2017-02-06 Thread Peter Chen
Add binding doc for generic power sequence library. Signed-off-by: Peter Chen Acked-by: Philipp Zabel Acked-by: Rob Herring --- .../bindings/power/pwrseq/pwrseq-generic.txt | 48 ++ 1 file changed, 48 insertions(+) create mode 100644 Documentation/devicetree

[PATCH v12 2/9] power: add power sequence library

2017-02-06 Thread Peter Chen
instead (eg, USB hub driver). For new power sequence library, it can add its compatible string to pwrseq_of_match_table, then the pwrseq core will match it with DT's, and choose this library at runtime. Signed-off-by: Peter Chen Tested-by: Maciej S. Szmigiero Tested-by Joshua Clayton Review

Re: [PATCH 2/8] power: add power sequence library

2017-02-03 Thread Peter Chen
On Fri, Feb 03, 2017 at 10:14:31PM +0100, Rafael J. Wysocki wrote: > On Friday, February 03, 2017 04:16:15 PM Peter Chen wrote: > > On Wed, Feb 01, 2017 at 09:08:17AM +0100, Greg Kroah-Hartman wrote: > > > On Wed, Feb 01, 2017 at 12:10:17AM +0100, Rafael J. Wysocki wrote: >

Re: [PATCH v8 0/3] Support qcom's HSIC USB and rewrite USB2 HS support

2017-02-03 Thread Peter Chen
y/phy-qcom-usb-hs.c | 296 > > +++++ > > drivers/phy/phy-qcom-usb-hsic.c| 160 +++ > > drivers/usb/chipidea/core.c| 20 +- > > 7 files changed, 636 insertions(+), 6 deletions(-) > > create mode 100644 > > Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.txt > > create mode 100644 > > Documentation/devicetree/bindings/phy/qcom,usb-hsic-phy.txt > > create mode 100644 drivers/phy/phy-qcom-usb-hs.c > > create mode 100644 drivers/phy/phy-qcom-usb-hsic.c > > > > ___ > linux-arm-kernel mailing list > linux-arm-ker...@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel -- Best Regards, Peter Chen

Re: [PATCH 2/8] power: add power sequence library

2017-02-03 Thread Peter Chen
On Wed, Feb 01, 2017 at 09:08:17AM +0100, Greg Kroah-Hartman wrote: > On Wed, Feb 01, 2017 at 12:10:17AM +0100, Rafael J. Wysocki wrote: > > On Tue, Jan 3, 2017 at 7:33 AM, Peter Chen wrote: > > > We have an well-known problem that the device needs to do some power > > >

Re: [RESEND PATCH] usb: chipidea: usb2: delete the redundant setting default DMA mask code

2017-01-23 Thread Peter Chen
} > > - ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32)); > - if (ret) > - goto clk_err; > - > ci_pdata->name = dev_name(dev); > > priv->ci_pdev = ci_hdrc_add_device(dev, pdev->resource, Applied, thanks. -- Best Regards, Peter Chen

Re: [RESEND PATCH] usb: chipidea: delete an useless header include

2017-01-23 Thread Peter Chen
b/drivers/usb/chipidea/core.c > index 3dbb4a21ab44..77078083e9fb 100644 > --- a/drivers/usb/chipidea/core.c > +++ b/drivers/usb/chipidea/core.c > @@ -62,7 +62,6 @@ > #include > #include > #include > -#include > #include > #include > Applied, thanks. -- Best Regards, Peter Chen

Re: [PATCH v11 2/8] power: add power sequence library

2017-01-21 Thread Peter Chen
On Fri, Jan 20, 2017 at 11:21:27AM +0100, Rafael J. Wysocki wrote: > On Fri, Jan 20, 2017 at 8:52 AM, Peter Chen wrote: > > On Tue, Jan 10, 2017 at 03:02:41PM +0800, Peter Chen wrote: > >> On Sat, Jan 07, 2017 at 10:54:56AM +0200, Krzysztof Kozlowski wrote: > >> >

Re: [PATCH v7 2/5] usb: chipidea: msm: Configure phy for appropriate mode

2017-01-21 Thread Peter Chen
_HOST); > } > break; > case CI_HDRC_CONTROLLER_STOPPED_EVENT: > -- > 2.10.0.297.gf6727b0 > > -- > 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

RE: [PATCH v7 4/5] usb: chipidea: Signal vbus state to phy

2017-01-21 Thread Peter Chen
> > drivers/usb/chipidea/otg.c | 7 +-- > 1 file changed, 5 insertions(+), 2 deletions(-) > >diff --git a/drivers/usb/chipidea/otg.c b/drivers/usb/chipidea/otg.c index >10236fe71522..6ea702beed48 100644 >--- a/drivers/usb/chipidea/otg.c >+++ b/drivers/usb/chipidea/otg.c >@@ -134,10 +134,13 @@

RE: [PATCH v7 3/5] phy: Add set_vbus callback

2017-01-21 Thread Peter Chen
> * @set_mode: set the mode of the phy >+ * @set_vbus: enable/disable vbus in the phy (USB) > * @reset: resetting the phy > * @owner: the module owner containing the ops > */ >@@ -45,6 +46,7 @@ struct phy_ops { > int (*power_on)(struct phy *phy); > int (*power_off)(struct

RE: [PATCH 1/1] regulator: fixed: add suspend pm routines for pinctrl

2017-01-20 Thread Peter Chen
> >>>On Tue, Jan 03, 2017 at 05:02:47PM +0800, Peter Chen wrote: >>>> At some systems, the pinctrl setting will be lost or needs to set as >>>> "sleep" state to save power consumption. So, we need to configure >>>> pinctrl as "sleep

Re: [PATCH v11 2/8] power: add power sequence library

2017-01-19 Thread Peter Chen
On Tue, Jan 10, 2017 at 03:02:41PM +0800, Peter Chen wrote: > On Sat, Jan 07, 2017 at 10:54:56AM +0200, Krzysztof Kozlowski wrote: > > On Thu, Jan 05, 2017 at 02:01:53PM +0800, Peter Chen wrote: > > > We have an well-known problem that the device needs to do some power > >

Re: [PATCH v6 00/25] Support qcom's HSIC USB and rewrite USB2 HS support

2017-01-19 Thread Peter Chen
the i2c driver to probe and send an i2c >sequence before the HSIC controller enumerates or HSIC doesn't work. >Right now I have a hack to force the controller to probe defer >once so that usb4604 probes first. This needs a more proper solution >like having the DT describ

Re: [PATCH v6 03/25] usb: ulpi: Support device discovery via DT

2017-01-18 Thread Peter Chen
+ > +static int ulpi_register(struct device *dev, struct ulpi *ulpi) > +{ > + int ret; > + > + ulpi->dev.parent = dev; /* needed early for ops */ > ulpi->dev.bus = &ulpi_bus; > ulpi->dev.type = &ulpi_dev_type; > dev_set_name(&ulpi->dev, "%s.ulpi", dev_name(dev)); > > ACPI_COMPANION_SET(&ulpi->dev, ACPI_COMPANION(dev)); > > - request_module("ulpi:v%04xp%04x", ulpi->id.vendor, ulpi->id.product); > + ret = ulpi_of_register(ulpi); > + if (ret) > + return ret; > + > + ret = ulpi_read_id(ulpi); > + if (ret) > + return ret; > > ret = device_register(&ulpi->dev); > if (ret) > @@ -234,6 +300,7 @@ EXPORT_SYMBOL_GPL(ulpi_register_interface); > */ > void ulpi_unregister_interface(struct ulpi *ulpi) > { > + of_node_put(ulpi->dev.of_node); > device_unregister(&ulpi->dev); > } > EXPORT_SYMBOL_GPL(ulpi_unregister_interface); > -- > 2.10.0.297.gf6727b0 > > > ___ > linux-arm-kernel mailing list > linux-arm-ker...@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel -- Best Regards, Peter Chen

Re: [PATCH v6 23/25] usb: chipidea: Pullup D+ in device mode via phy APIs

2017-01-18 Thread Peter Chen
On Wed, Jan 18, 2017 at 02:57:27PM -0600, Rob Herring wrote: > On Wed, Jan 18, 2017 at 2:54 PM, Stephen Boyd wrote: > > Quoting Peter Chen (2017-01-17 23:34:32) > >> On Tue, Jan 17, 2017 at 09:58:33AM -0800, Stephen Boyd wrote: > >> > Quoting Peter Chen (2017-01-15

Re: [PATCH v6 23/25] usb: chipidea: Pullup D+ in device mode via phy APIs

2017-01-17 Thread Peter Chen
On Tue, Jan 17, 2017 at 09:58:33AM -0800, Stephen Boyd wrote: > Quoting Peter Chen (2017-01-15 19:45:51) > > > > So, you need to call phy_set_mode when switching between host and device. > > Besides, you also need to toggle VBUSVLDEXT when the external vbus > >

Re: [PATCH v6 23/25] usb: chipidea: Pullup D+ in device mode via phy APIs

2017-01-15 Thread Peter Chen
On Fri, Jan 13, 2017 at 12:03:00PM -0800, Stephen Boyd wrote: > Quoting Peter Chen (2017-01-12 19:35:36) > > On Thu, Jan 12, 2017 at 02:49:51PM -0800, Stephen Boyd wrote: > > > > > > With the boards I have, vbus is not routed to the phy. Instead, there's > >

Re: [PATCH v6 23/25] usb: chipidea: Pullup D+ in device mode via phy APIs

2017-01-12 Thread Peter Chen
On Thu, Jan 12, 2017 at 02:49:51PM -0800, Stephen Boyd wrote: > Quoting Peter Chen (2017-01-12 01:50:40) > > On Wed, Jan 11, 2017 at 04:19:53PM -0800, Stephen Boyd wrote: > > > Quoting Peter Chen (2017-01-02 22:53:19) > > > > On Wed, Dec 28, 2016 at 02:57:

Re: [PATCH v6 11/25] usb: chipidea: vbus event may exist before starting gadget

2017-01-12 Thread Peter Chen
On Wed, Jan 11, 2017 at 04:32:34PM -0800, Stephen Boyd wrote: > Quoting Peter Chen (2017-01-03 00:00:31) > > On Wed, Dec 28, 2016 at 02:56:57PM -0800, Stephen Boyd wrote: > > > From: Peter Chen > > > > > > At some situations, the vbus may already be there befo

Re: [PATCH v6 23/25] usb: chipidea: Pullup D+ in device mode via phy APIs

2017-01-12 Thread Peter Chen
On Wed, Jan 11, 2017 at 04:19:53PM -0800, Stephen Boyd wrote: > Quoting Peter Chen (2017-01-02 22:53:19) > > On Wed, Dec 28, 2016 at 02:57:09PM -0800, Stephen Boyd wrote: > > > If the phy supports it, call phy_set_mode() to pull up D+ when > > > required by setting the

Re: [PATCH v11 2/8] power: add power sequence library

2017-01-09 Thread Peter Chen
On Sat, Jan 07, 2017 at 10:54:56AM +0200, Krzysztof Kozlowski wrote: > On Thu, Jan 05, 2017 at 02:01:53PM +0800, Peter Chen wrote: > > We have an well-known problem that the device needs to do some power > > sequence before it can be recognized by related host, the typical > &

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

2017-01-04 Thread Peter Chen
Add binding doc for generic power sequence library. Signed-off-by: Peter Chen Acked-by: Philipp Zabel Acked-by: Rob Herring --- .../bindings/power/pwrseq/pwrseq-generic.txt | 48 ++ 1 file changed, 48 insertions(+) create mode 100644 Documentation/devicetree

[PATCH v2 1/1] regulator: fixed: add suspend pm routines for pinctrl

2017-01-04 Thread Peter Chen
e can be recovered as "default" state after resuming. Signed-off-by: Peter Chen --- Changes for v2: - Fixed build error reported by Kbuild robot, the header file was not added. drivers/regulator/fixed.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drive

[PATCH v11 0/8] power: add power sequence library

2017-01-04 Thread Peter Chen
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 Joshua Clayton (2): ARM: dts: imx6qdl: Enable usb node children with ARM: dts: imx6q-evi: Fix onboard hub reset line

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

2017-01-04 Thread Peter Chen
t. Signed-off-by: Peter Chen Tested-by Joshua Clayton Tested-by: Maciej S. Szmigiero Reviewed-by: Vaibhav Hiremath --- drivers/usb/Kconfig| 1 + drivers/usb/core/hub.c | 48 drivers/usb/core/hub.h | 1 + 3 files changed, 46 insertions(+), 4

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

2017-01-04 Thread Peter Chen
From: Peter Chen 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, we let the core's dev

[PATCH v11 2/8] power: add power sequence library

2017-01-04 Thread Peter Chen
instead (eg, USB hub driver). For new power sequence library, it can add its compatible string to pwrseq_of_match_table, then the pwrseq core will match it with DT's, and choose this library at runtime. Signed-off-by: Peter Chen Tested-by: Maciej S. Szmigiero Tested-by Joshua Clayton Review

[PATCH v11 6/8] ARM: dts: imx6qdl: Enable usb node children with

2017-01-04 Thread Peter Chen
From: Joshua Clayton Give usb nodes #address and #size attributes, so that a child node representing a permanently connected device such as an onboard hub may be addressed with a attribute Signed-off-by: Joshua Clayton Signed-off-by: Peter Chen --- arch/arm/boot/dts/imx6qdl.dtsi | 6

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

2017-01-04 Thread Peter Chen
Add optional properties for power sequence. Signed-off-by: Peter Chen Acked-by: Rob Herring --- 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

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

2017-01-04 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. Besides, using gpio pinctrl setting for USB2415's reset pin. Signed-off-by: Peter Chen

[PATCH v11 8/8] ARM: dts: imx6q-evi: Fix onboard hub reset line

2017-01-04 Thread Peter Chen
From: Joshua Clayton Previously the onboard hub was made to work by treating its reset gpio as a regulator enable. Get rid of that kludge now that pwseq has added reset gpio support Move pin muxing the hub reset pin into the usbh1 group Signed-off-by: Joshua Clayton Signed-off-by: Peter Chen

[PATCH v2 1/1] extcon: usb-gpio: add pinctrl operation during system PM

2017-01-03 Thread Peter Chen
e can be recovered as "default" state after resuming. Signed-off-by: Peter Chen --- Changes for v2: - Add header file for pinctrl to avoid build error - Only set pin as "sleep" state when the wakeup is not requested drivers/extcon/extcon-usb-gpio.c | 7 +++ 1 file changed, 7

RE: [PATCH 1/1] regulator: fixed: add suspend pm routines for pinctrl

2017-01-03 Thread Peter Chen
>>On Tue, Jan 03, 2017 at 05:02:47PM +0800, Peter Chen wrote: >>> At some systems, the pinctrl setting will be lost or needs to set as >>> "sleep" state to save power consumption. So, we need to configure >>> pinctrl as "sleep" state when sy

RE: [PATCH 1/1] regulator: fixed: add suspend pm routines for pinctrl

2017-01-03 Thread Peter Chen
>On Tue, Jan 03, 2017 at 05:02:47PM +0800, Peter Chen wrote: >> At some systems, the pinctrl setting will be lost or needs to set as >> "sleep" state to save power consumption. So, we need to configure >> pinctrl as "sleep" state when system enters suspen

RE: [PATCH 1/1] extcon: usb-gpio: add pinctrl operation during system PM

2017-01-03 Thread Peter Chen
> >On 03/01/17 10:17, Peter Chen wrote: >> At some systems, the pinctrl setting will be lost or needs to set as >> "sleep" state to save power consumption. So, we need to configure >> pinctrl as "sleep" state when system enters suspend, and as "de

[PATCH 1/1] regulator: fixed: add suspend pm routines for pinctrl

2017-01-03 Thread Peter Chen
e can be recovered as "default" state after resuming. Signed-off-by: Peter Chen --- drivers/regulator/fixed.c | 21 + 1 file changed, 21 insertions(+) diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c index a43b0e8..8f41015 100644 --- a/drivers/regulator

[PATCH 1/1] extcon: usb-gpio: add pinctrl operation during system PM

2017-01-03 Thread Peter Chen
e can be recovered as "default" state after resuming. Signed-off-by: Peter Chen --- drivers/extcon/extcon-usb-gpio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/extcon/extcon-usb-gpio.c b/drivers/extcon/extcon-usb-gpio.c index d589c5f..f7172ae 100644 --- a/drivers/extco

Re: [PATCH v6 11/25] usb: chipidea: vbus event may exist before starting gadget

2017-01-03 Thread Peter Chen
On Wed, Dec 28, 2016 at 02:56:57PM -0800, Stephen Boyd wrote: > From: Peter Chen > > At some situations, the vbus may already be there before starting > gadget. So we need to check vbus event after switch to gadget in > order to handle missing vbus event. The typical use cas

Re: [PATCH v6 23/25] usb: chipidea: Pullup D+ in device mode via phy APIs

2017-01-02 Thread Peter Chen
On Wed, Dec 28, 2016 at 02:57:09PM -0800, Stephen Boyd wrote: > If the phy supports it, call phy_set_mode() to pull up D+ when > required by setting the mode to PHY_MODE_USB_DEVICE. If we want > to remove the pullup, set the mode to PHY_MODE_USB_HOST. > > Cc: Peter Chen > Cc:

Re: [PATCH v6 22/25] usb: chipidea: Drop lock across event_notify during gadget stop

2017-01-02 Thread Peter Chen
On Wed, Dec 28, 2016 at 02:57:08PM -0800, Stephen Boyd wrote: > The CI_HDRC_CONTROLLER_STOPPED_EVENT may want to call sleeping > APIs similar to how _gadget_stop_activity() may. Let's drop the > lock across the event so that glue drivers can make sleeping > calls. > > Cc:

[PATCH 8/8] ARM: dts: imx6q-evi: Fix onboard hub reset line

2017-01-02 Thread Peter Chen
From: Joshua Clayton Previously the onboard hub was made to work by treating its reset gpio as a regulator enable. Get rid of that kludge now that pwseq has added reset gpio support Move pin muxing the hub reset pin into the usbh1 group Signed-off-by: Joshua Clayton Signed-off-by: Peter Chen

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

2017-01-02 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. Besides, using gpio pinctrl setting for USB2415's reset pin. Signed-off-by: Peter Chen

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

2017-01-02 Thread Peter Chen
From: Peter Chen 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, we let the core's dev

[PATCH 6/8] ARM: dts: imx6qdl: Enable usb node children with

2017-01-02 Thread Peter Chen
From: Joshua Clayton Give usb nodes #address and #size attributes, so that a child node representing a permanently connected device such as an onboard hub may be addressed with a attribute Signed-off-by: Joshua Clayton Signed-off-by: Peter Chen --- arch/arm/boot/dts/imx6qdl.dtsi | 6

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

2017-01-02 Thread Peter Chen
t. Signed-off-by: Peter Chen Tested-by Joshua Clayton Tested-by: Maciej S. Szmigiero Reviewed-by: Vaibhav Hiremath --- drivers/usb/Kconfig| 1 + drivers/usb/core/hub.c | 48 drivers/usb/core/hub.h | 1 + 3 files changed, 46 insertions(+), 4

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

2017-01-02 Thread Peter Chen
Add optional properties for power sequence. Signed-off-by: Peter Chen Acked-by: Rob Herring --- 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

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

2017-01-02 Thread Peter Chen
instead (eg, USB hub driver). For new power sequence library, it can add its compatible string to pwrseq_of_match_table, then the pwrseq core will match it with DT's, and choose this library at runtime. Signed-off-by: Peter Chen Tested-by: Maciej S. Szmigiero Tested-by Joshua Clayton Review

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