Re: [PATCH] usb: Kconfig: make USB_ULPI_BUS select USB_COMMON

2016-09-13 Thread Peter Chen
On Tue, Sep 13, 2016 at 09:04:08AM +0200, Arnd Bergmann wrote: > On Tuesday, September 13, 2016 9:48:55 AM CEST Peter Chen wrote: > > On Mon, Sep 12, 2016 at 05:36:23PM +0200, Arnd Bergmann wrote: > > > Moving the CONFIG_USB_ULPI_BUS option to the top-level Kconfig file >

Re: [PATCH v4 22/22] phy: Add support for Qualcomm's USB HS phy

2016-09-13 Thread Peter Chen
t) == -EPROBE_DEFER) > + return PTR_ERR(reset); > + uphy->reset = NULL; > + } > + > + uphy->phy = devm_phy_create(>dev, ulpi->dev.of_node, > + _usb_hs_phy_ops); > + if (IS_ERR(uphy->phy)) > +

Re: ULPI phy issue with

2016-09-13 Thread Peter Chen
On Mon, Sep 12, 2016 at 12:06:10PM +0200, Fabien Lahoudere wrote: > > > On 12/09/16 11:46, Peter Chen wrote: > >On Mon, Sep 12, 2016 at 11:13:01AM +0200, Fabien Lahoudere wrote: > >>Hi, > >> > >>>Yes, please send the patch and tell me which

Re: [PATCH] usb: Kconfig: make USB_ULPI_BUS select USB_COMMON

2016-09-12 Thread Peter Chen
ed! > Thanks, Arnd. I have submitted the fix. https://git.kernel.org/cgit/linux/kernel/git/gregkh/usb.git/commit/?h=usb-next=6406c3d226374c28d452b11db3b5ac241ce26191 -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of

Re: ULPI phy issue with

2016-09-12 Thread Peter Chen
latform since the system hang usually dues to without PHY clock, so would you send platform stuffs like dts (which dts), etc? -- 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: host: fix NULL ptr dereference during shutdown

2016-09-12 Thread Peter Chen
queue it. Since it affects not only reboot/shutdown, but also for role switch and module load/unload. It needs several weeks to test, it may be too late for v4.8, I will send it as bug-fix for v4.9 if test results 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

[PATCH v2 1/1] usb: Kconfig: let USB_ULPI_BUS depends on USB_COMMON

2016-09-12 Thread Peter Chen
y-tusb1210.ko] undefined! >> ERROR: "__ulpi_register_driver" [drivers/phy/phy-tusb1210.ko] undefined! >> ERROR: "ulpi_write" [drivers/phy/phy-tusb1210.ko] undefined! Fixes: ad764c49f65a ("usb: Kconfig: move ulpi bus support out of host") Reported-by: kbuild test robot <fen

[PATCH 1/1] usb: Kconfig: let USB_ULPI_BUS depends on USB_COMMON

2016-09-12 Thread Peter Chen
y-tusb1210.ko] undefined! >> ERROR: "__ulpi_register_driver" [drivers/phy/phy-tusb1210.ko] undefined! >> ERROR: "ulpi_write" [drivers/phy/phy-tusb1210.ko] undefined! Fixes: ad764c49f65a ("usb: Kconfig: move ulpi bus support out of host") Cc: Fengguang Wu <fengguang...@inte

Re: [usb:usb-next 124/126] ERROR: "ulpi_unregister_driver" [drivers/phy/phy-tusb1210.ko] undefined!

2016-09-12 Thread Peter Chen
On Mon, Sep 12, 2016 at 12:34:20PM +0800, Fengguang Wu wrote: > On Mon, Sep 12, 2016 at 11:36:20AM +0800, Peter Chen wrote: > >On Mon, Sep 12, 2016 at 07:16:07AM +0800, kbuild test robot wrote: > >>tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git >

Re: [usb:usb-next 124/126] ERROR: "ulpi_unregister_driver" [drivers/phy/phy-tusb1210.ko] undefined!

2016-09-11 Thread Peter Chen
quot;ulpi_write" [drivers/phy/phy-tusb1210.ko] undefined! > I am afraid I can't reproduce it after set CONFIG_USB_ULPI_BUS=m and CONFIG_PHY_TUSB1210=m like attached configuration. Would you please double confirm it, thanks. -- Best Regards, Peter Chen -- To unsubscribe from this list: sen

Re: [PATCH v1 1/2] usb: gadget: u_ether: fix another dereference after null check

2016-09-09 Thread Peter Chen
is dwNtbInMaxSize */ > - if (dev->port_usb->is_fixed && > + if (dev->port_usb && > + dev->port_usb->is_fixed && > length == dev->port_usb->fixed_in_len && > (length % in->maxpacket) == 0) >

Re: ULPI phy issue with

2016-09-09 Thread Peter Chen
On Fri, Sep 09, 2016 at 12:50:45PM +0200, Fabien Lahoudere wrote: > Hi, > > Thanks for your reply. > > On 09/09/16 09:42, Peter Chen wrote: > >On Thu, Sep 08, 2016 at 10:00:22AM +0200, Fabien Lahoudere wrote: > >>Hi, > >> > >>I have an imx53 bas

Re: usb: chipidea: hdc: kernel panic during shutdown

2016-09-09 Thread Peter Chen
On Fri, Sep 09, 2016 at 04:35:02PM +0200, Stefan Wahren wrote: > Am 05.09.2016 um 04:51 schrieb Peter Chen: > > On Fri, Sep 02, 2016 at 08:20:35PM +0200, Stefan Wahren wrote: > >> Hi Peter, > >> > >>> Stefan Wahren <stefan.wah...@i2se.com> hat

[GIT PULL] usb: chipidea fix for v4.8

2016-09-09 Thread Peter Chen
signal is bad for chipidea udc. Clemens Gruber (1): usb: chipidea: udc: fix NULL ptr dereference in isr_setup_status_phase drivers/usb/chipidea/udc.c | 9 + 1 file changed, 9 insertions(+) -- Best Regards, Peter

Re: [PATCH V5] leds: trigger: Introduce a USB port trigger

2016-09-09 Thread Peter Chen
B LEDs, > 2 physical ports and 3 controllers. > > Another planned feature is support for LED reacting to the USB activity. > This can be implemented with another sysfs file for setting mode. The > default mode wouldn't change so there won't be ABI breakage and such > feature can be safely

Re: [PATCH 3/3] usb: chipidea: udc: Use the preferred form for passing a size of a struct

2016-09-09 Thread Peter Chen
t; - rdrv = devm_kzalloc(ci->dev, sizeof(struct ci_role_driver), GFP_KERNEL); > + rdrv = devm_kzalloc(ci->dev, sizeof(*rdrv), GFP_KERNEL); > if (!rdrv) > return -ENOMEM; > Will queue all. -- Best Regards, Peter Chen -- To unsubscribe from this list:

Re: ULPI phy issue with

2016-09-09 Thread Peter Chen
ce of patch > (that works in my case) could be acceptable : Do you use upstream kernel? I wonder if current drivers/usb/phy/phy-ulpi.c code can work well with DT? Stephen Boyd posted ULPI support for chipidea recently, would you please try if it works for you: usb: chipidea: Add support f

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Peter Chen
On Thu, Sep 08, 2016 at 03:59:19PM +0300, Grygorii Strashko wrote: > On 09/08/2016 03:28 PM, Peter Chen wrote: > > On Thu, Sep 08, 2016 at 12:17:21PM +0200, Arnd Bergmann wrote: > >> On Thursday, September 8, 2016 12:43:06 PM CEST Felipe Balbi wrote: > >>> Arnd B

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Peter Chen
On Thu, Sep 08, 2016 at 02:52:29PM +0200, Arnd Bergmann wrote: > On Thursday, September 8, 2016 8:28:10 PM CEST Peter Chen wrote: > > On Thu, Sep 08, 2016 at 12:17:21PM +0200, Arnd Bergmann wrote: > > > On Thursday, September 8, 2016 12:43:06 PM CEST Felipe Balbi wrote: >

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

2016-09-08 Thread Peter Chen
On Thu, Sep 08, 2016 at 02:13:28PM -0700, Stephen Boyd wrote: > Quoting Peter Chen (2016-09-07 19:06:45) > > On Thu, Sep 8, 2016 at 5:34 AM, Stephen Boyd <stephen.b...@linaro.org> > > wrote: > > > The state of USB ChipIdea support on Qualcomm's platforms is not g

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Peter Chen
<_phy1>; > phy-names = "usb2-phy", "usb3-phy"; > > hub@1 { > compatible = "usb5e3,608"; > reg = <1>; > #address-cells = <1>;

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

2016-09-07 Thread Peter Chen
On Thu, Sep 8, 2016 at 5:34 AM, Stephen Boyd wrote: > The state of USB ChipIdea support on Qualcomm's platforms is not great. > The DT description of these devices requires up to three different nodes > for what amounts to be the same hardware block, when there should

Re: [PATCH v4 10/22] usb: chipidea: Consolidate extcon notifiers

2016-09-07 Thread Peter Chen
save some lines. This also makes it so that > the id cable state is true when the id pin is pulled low, so we > change the name of ->state to ->connected to properly reflect > that we're interested in the cable being connected. > > Cc: Peter Chen <peter.c...@nxp.com> > Cc: G

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Peter Chen
> Right, I was specifically talking about the code in chipidea here, > which I think is never used on the PCI bus, and how the current > code is broken. We can probably do better than of_dma_configure() > (see below), but it would be an improvement. Chipidea is also used at PCI bus too, see drivers/usb/chipidea/ci_hdrc_pci.c -- 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: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Peter Chen
On Wed, Sep 07, 2016 at 10:48:06AM +0200, Arnd Bergmann wrote: > On Wednesday, September 7, 2016 2:33:13 PM CEST Peter Chen wrote: > > > > > > Right, that should make it work with iommu as well. However, it does > > > not solve the other issue I mentioned above, w

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Peter Chen
On Wed, Sep 07, 2016 at 10:52:46AM +0200, Arnd Bergmann wrote: > On Wednesday, September 7, 2016 3:44:28 PM CEST Peter Chen wrote: > > > > The pre-condition of DT function at USB HCD core works is the host > > controller device has of_node, since it is the root node for U

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Peter Chen
a driver gets it through its parent node [1] > It might be a good idea to use 'struct fwnode_handle' for that, > so we can in the future also allow ACPI platforms to specify > > > Note, we would NOT be passing device pointers are platform_data, we > > would have dwc3.ko figure out if it should use self or its parent device > > for dma. > > Ok, sounds good. > > Arnd [1] https://lkml.org/lkml/2016/8/8/119 -- 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: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Peter Chen
On Tue, Sep 06, 2016 at 12:38:29PM +0200, Arnd Bergmann wrote: > On Tuesday, September 6, 2016 2:35:29 PM CEST Peter Chen wrote: > > On Mon, Sep 05, 2016 at 05:39:27PM +0200, Arnd Bergmann wrote: > > > On Friday, September 2, 2016 5:16:31 PM CEST Leo Li wrote: &g

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-06 Thread Peter Chen
of_dma_configure() > in all cases in which we actually use DT for probing, which > should cover the interesting cases. > One case I am going to work is to let USB chipidea driver support iommu, the chipidea core device is no of_node, and created by platform_add_device on the runtime. Using

RE: [PATCH] usb: gadget: prevent potenial null pointer dereference on skb->len

2016-09-05 Thread Peter Chen
skb->len; >+ u16 len; > > if (!skb) > return NULL; Sorry, my careless, Thanks for fixing it. Acked-by: Peter Chen <peter.c...@nxp.com> Peter

Re: [PATCH] usb: chipidea: udc: fix NULL ptr dereference in isr_setup_status_phase

2016-09-05 Thread Peter Chen
tion occurs, you should review your USB hardware design. > + */ > + if (WARN_ON_ONCE(!ci->status)) > + return -EPIPE; > + > hwep = (ci->ep0_dir == TX) ? ci->ep0out : ci->ep0in; > ci->status->context = ci; > ci->sta

Re: chipidea: udc: kernel panic in isr_setup_status_phase

2016-09-04 Thread Peter Chen
On Fri, Sep 02, 2016 at 06:42:43PM +0200, Clemens Gruber wrote: > On Fri, Sep 02, 2016 at 09:55:52AM +0800, Peter Chen wrote: > > Do you have other 5V to USB_H1_VBUS? USB PHY needs 5V input voltage > > as the source for USB LDO (3.0v), either from OTG or Host 1. I suspect >

Re: usb: chipidea: hdc: kernel panic during shutdown

2016-09-04 Thread Peter Chen
On Fri, Sep 02, 2016 at 08:20:35PM +0200, Stefan Wahren wrote: > Hi Peter, > > > Stefan Wahren <stefan.wah...@i2se.com> hat am 25. August 2016 um 19:17 > > geschrieben: > > > > > > Hi, > > > > > Peter Chen <hzpeterc...@

Re: [PATCH v3 10/22] usb: chipidea: Consolidate extcon notifiers

2016-09-04 Thread Peter Chen
On Fri, Sep 02, 2016 at 06:03:06PM -0700, Stephen Boyd wrote: > On Thu, Sep 1, 2016 at 8:17 PM, Peter Chen <hzpeterc...@gmail.com> wrote: > > On Wed, Aug 31, 2016 at 05:40:24PM -0700, Stephen Boyd wrote: > >> > >> > >> if (cable->stat

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

2016-09-01 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 v3 10/22] usb: chipidea: Consolidate extcon notifiers

2016-09-01 Thread Peter Chen
save some lines. This also makes it so that > the id cable state is true when the id pin is pulled low. > > Cc: Peter Chen <peter.c...@nxp.com> > Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> > Cc: "Ivan T. Ivanov" <iivanov...@gmail.com> > Signed-off-by

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

2016-09-01 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 v3 04/22] usb: chipidea: Only read/write OTGSC from one place

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

Re: [PATCH 1/1] subsystem:usb

2016-09-01 Thread Peter Chen
} > dev_info(>dev, "LEGO USB Tower firmware version is %d.%d " > "build %d\n", get_version_reply.major, > get_version_reply.minor, > le16_to_cpu(get_version_reply.build_no)); > > - > + m

Re: chipidea: udc: kernel panic in isr_setup_status_phase

2016-09-01 Thread Peter Chen
On Tue, Aug 30, 2016 at 07:20:45PM +0200, Clemens Gruber wrote: > On Mon, Aug 29, 2016 at 06:24:03PM +0800, Peter Chen wrote: > > Would you please measure the voltage of vbus within 1s at below two > > conditions: > > > > - Just connect cable > > - Just d

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

2016-09-01 Thread Peter Chen
On Thu, Sep 01, 2016 at 01:32:49PM +0530, Vaibhav Hiremath wrote: > > > On Monday 15 August 2016 02:43 PM, 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 > >

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

2016-09-01 Thread Peter Chen
; > >+}; > >+ > >+#if IS_ENABLED(CONFIG_POWER_SEQUENCE) > >+int pwrseq_get(struct device_node *np, struct pwrseq *p); > >+int pwrseq_on(struct device_node *np, struct pwrseq *p); > >+void pwrseq_off(struct pwrseq *p); > >+void pwrseq_put(struct pwrseq *p); > &g

Re: [PATCH v6 0/8] power: add power sequence library

2016-09-01 Thread Peter Chen
On Wed, Aug 31, 2016 at 10:28:20PM +0530, Vaibhav Hiremath wrote: > > > On Wednesday 31 August 2016 03:22 PM, Peter Chen wrote: > >On Wed, Aug 31, 2016 at 01:46:30PM +0530, Vaibhav Hiremath wrote: > >> > >>On Monday 29 August 2016 04:40 PM, Peter Chen wrote: &

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

2016-09-01 Thread Peter Chen
On Thu, Sep 01, 2016 at 01:33:22PM +0530, Vaibhav Hiremath wrote: > > > On Monday 15 August 2016 02:43 PM, Peter Chen wrote: > >Add binding doc for generic power sequence library. > > > >Signed-off-by: Peter Chen <peter.c...@nxp.com> > >Acked-by: Philipp

Re: [PATCH v6 0/8] power: add power sequence library

2016-08-31 Thread Peter Chen
On Wed, Aug 31, 2016 at 01:46:30PM +0530, Vaibhav Hiremath wrote: > > > On Monday 29 August 2016 04:40 PM, Peter Chen wrote: > >On Wed, Aug 24, 2016 at 04:53:35PM +0800, Peter Chen wrote: > >>On Tue, Aug 23, 2016 at 04:02:48PM +0530, Vaibhav Hiremath wrote: > >>&

Re: [PATCH v6 0/8] power: add power sequence library

2016-08-28 Thread Peter Chen
On Wed, Aug 24, 2016 at 04:53:35PM +0800, Peter Chen wrote: > On Tue, Aug 23, 2016 at 04:02:48PM +0530, Vaibhav Hiremath wrote: > > > > > > On Monday 15 August 2016 02:43 PM, Peter Chen wrote: > > >Hi all, > > > > > >This is a follow-up f

Re: chipidea: udc: kernel panic in isr_setup_status_phase

2016-08-28 Thread Peter Chen
On Sun, Aug 28, 2016 at 08:15:02PM +0200, Clemens Gruber wrote: > On Sat, Aug 27, 2016 at 01:21:52AM +0800, Peter Chen wrote: > > The gadget triggers UI interrupt due to host sends packet. > > > > I really can't understand that, why host does not send bus reset > >

Re: chipidea: udc: kernel panic in isr_setup_status_phase

2016-08-26 Thread Peter Chen
On Fri, Aug 26, 2016 at 01:47:40AM +0200, Clemens Gruber wrote: > On Wed, Aug 24, 2016 at 04:11:02PM +0800, Peter Chen wrote: > > UEI is an error interrupt, and software have not handled it, so it will > > not affect ci->status. > > > > > Should we only call isr_

Re: chipidea: udc: kernel panic in isr_setup_status_phase

2016-08-26 Thread Peter Chen
On Fri, Aug 26, 2016 at 01:47:40AM +0200, Clemens Gruber wrote: > On Wed, Aug 24, 2016 at 04:11:02PM +0800, Peter Chen wrote: > > UEI is an error interrupt, and software have not handled it, so it will > > not affect ci->status. > > > > > Should we only call isr_

Re: usb: chipidea: hdc: kernel panic during shutdown

2016-08-25 Thread Peter Chen
On Thu, Aug 25, 2016 at 08:27:03AM +0200, Stefan Wahren wrote: > Am 25.08.2016 um 08:44 schrieb Peter Chen: > > On Thu, Aug 25, 2016 at 07:06:12AM +0200, Stefan Wahren wrote: > >> Hi Alan, > >> > >> i tried the following patch: > >> --- a/drivers/usb/ch

Re: usb: chipidea: hdc: kernel panic during shutdown

2016-08-25 Thread Peter Chen
> > > > > > [add Li Jun to CC] > > > > > > > Alan Stern <st...@rowland.harvard.edu> hat am 24. August 2016 um 15:45 > > > > geschrieben: > > > > > > > > > > > > On Wed, 24 Aug 2016, Peter Chen wrote: &

Re: [PATCH v6 0/8] power: add power sequence library

2016-08-24 Thread Peter Chen
On Tue, Aug 23, 2016 at 04:02:48PM +0530, Vaibhav Hiremath wrote: > > > On Monday 15 August 2016 02:43 PM, 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: chipidea: udc: kernel panic in isr_setup_status_phase

2016-08-24 Thread Peter Chen
in udc_irq. > Could this be the cause of this error? UEI is an error interrupt, and software have not handled it, so it will not affect ci->status. > Should we only call isr_tr_complete_handler if UI && !UEI ? > > Or would adding a check for ci->status == NULL in isr_setup-status_phase &

Re: usb: chipidea: hdc: kernel panic during shutdown

2016-08-23 Thread Peter Chen
ff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c index 96ae695..61237a9 100644 --- a/drivers/usb/chipidea/host.c +++ b/drivers/usb/chipidea/host.c @@ -103,7 +103,7 @@ static const struct ehci_driver_overrides ehci_ci_overrides = { static irqreturn_t host_irq(struct ci_hdrc *ci) {

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

2016-08-22 Thread Peter Chen
nd put the content at hub_pwrseq_on at hub_probe directly, how about below? hub_probe() { ... if (hub_configure(hub, endpoint) >= 0) { #ifdef CONFIG_OF for_each_child_of_node(parent->of_node, np) { ret = generic_pwrseq_on(np, hub);

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

2016-08-22 Thread Peter Chen
On Mon, Aug 22, 2016 at 12:23:31PM +0200, Sebastian Reichel wrote: > Hi Peter, > > On Mon, Aug 22, 2016 at 02:51:58PM +0800, Peter Chen wrote: > > On Mon, Aug 15, 2016 at 05:13:12PM +0800, Peter Chen wrote: > > > We have an well-known problem that the device needs to do s

Re: [PATCH] usb: chipidea: support generic phy in PM code path

2016-08-22 Thread Peter Chen
On Mon, Aug 22, 2016 at 02:39:21PM +0800, Jisheng Zhang wrote: > Hi Peter, > > On Mon, 22 Aug 2016 13:33:08 +0800 Peter Chen wrote: > > > On Fri, Aug 19, 2016 at 08:10:13PM +0800, Jisheng Zhang wrote: > > > Support generic phy in PM code path: call

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

2016-08-22 Thread Peter Chen
On Mon, Aug 15, 2016 at 05:13:14PM +0800, 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 clock, toggle reset pin, etc. But current Linux USB driver > lacks of such code to d

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

2016-08-22 Thread Peter Chen
On Mon, Aug 15, 2016 at 05:13:12PM +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 > example like hard-wired mmc devices and usb devices. > > This power s

Re: [PATCH] usb: chipidea: support generic phy in PM code path

2016-08-21 Thread Peter Chen
gt; > -- > 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

[GIT PULL] usb: chipidea fixes for v4.8

2016-08-18 Thread Peter Chen
changed, 5 insertions(+), 2 deletions(-) -- 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 v5 2/2] usb: typec: add driver for Intel Whiskey Cove PMIC USB Type-C PHY

2016-08-17 Thread Peter Chen
Intel Corporation"); > > +MODULE_LICENSE("GPL v2"); > > +MODULE_DESCRIPTION("WhiskeyCove PMIC USB Type-C PHY driver"); > > you need to add: > > MODULE_ALIAS("platform:bxt_wcove_usbc"); > > otherwise this won't probe() automagically. &

Re: [Umap2][10/11][1a0a:0102] USB host stops communicating

2016-08-17 Thread Peter Chen
de as described in Section 7.1.20 [USB2.0] and drives an SE0 until the controller is reset. So, it is expected that the host stops enumerating. -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vg

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

2016-08-16 Thread Peter Chen
->tx_reg_set |= GM_USBPHY_TX_TXCAL45DP(val); > + } > + > + if (!of_property_read_u32(np, "fsl,tx-d-cal", ) && > + val >= MXS_PHY_TX_D_CAL_MIN && val <= MXS_PHY_TX_D_CAL_MAX) { > + /* Scale to a 4-bit value. Round up the v

Re: [PATCH v2 0/3] USB Audio Gadget refactoring

2016-08-16 Thread Peter Chen
On Tue, Aug 16, 2016 at 11:32:55AM +0200, Clemens Ladisch wrote: > Peter Chen wrote: > > I find UAC2 (UAC1 is ok) support is not well with the latest mainline > > kernel w/o your patch set. The windows7 can't install the driver > > successfully > > Windows does not ha

[PATCH 1/1] usb: Kconfig: move ulpi bus support out of host

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

Re: [PATCH v2 0/3] USB Audio Gadget refactoring

2016-08-16 Thread Peter Chen
ng WAVE 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo Playing WAVE 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo underrun!!! (at least 36.634 ms long) underrun!!! (at least 36.117 ms long) underrun!!! (at least 42.132 ms long) underrun!!! (at least 40.157 ms long) underrun!!!

Re: [PATCH v2 3/3] usb: gadget: add f_uac1 variant based on new u_audio api

2016-08-15 Thread Peter Chen
ONFIGFS_F_UAC1 > This driver requires a real Audio codec to be present > on the device. > > +config USB_CONFIGFS_F_UAC1_NEWAPI > + bool "Audio Class 1.0 (new API)" > + depends on USB_CONFIGFS > + depends on SND > + select USB_LIBCOMPOSITE > + select SND_PCM > + select USB_U_AUDIO > + select USB_F_UAC1_NEWAPI > + help > + This Audio function implements 1 AudioControl interface, > + 1 AudioStreaming Interface each for USB-OUT and USB-IN. %s/1/one -- 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: host: disable io watchdog

2016-08-15 Thread Peter Chen
ci = hcd_to_ehci(hcd); > int ret; > > ret = ehci_setup(hcd); > if (ret) > return ret; > > + ehci->need_io_watchdog = 0; > + > ci_platform_configure(ci); > > return ret; > -- > 2.8.1 > I will test

Re: [lkp] [usb] ad05399d68: BUG: unable to handle kernel NULL pointer dereference at 0000000000000012

2016-08-15 Thread Peter Chen
On Mon, Aug 15, 2016 at 10:49:55PM +0800, Ye Xiaolong wrote: > On 08/15, Peter Chen wrote: > > > >> > >> > >>FYI, we noticed the following commit: > >> > >>https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git testing/next > &g

Re: [PATCH] USB: core: of: Check device_node before parsing in usb_of_get_child_node()

2016-08-15 Thread Peter Chen
I am afraid I can't reproduce it, would you please show me your dump when null pointer dereference occurs? From what I find the __of_get_next_child checks null pointer for parent node. -- 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: Kconfig: move ulpi bus to common

2016-08-15 Thread Peter Chen
On Mon, Aug 15, 2016 at 04:07:14PM +0300, Heikki Krogerus wrote: > Hi, > > 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. > > > >

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

2016-08-15 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 v6 6/8] ARM: dts: imx6qdl: Enable usb node children with

2016-08-15 Thread Peter Chen
From: Joshua Clayton <stillcompil...@gmail.com> 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 <stillcompil...@gmail.com> Signed-o

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

2016-08-15 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 <peter.c...@nxp.

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

2016-08-15 Thread Peter Chen
layton <stillcompil...@gmail.com> Signed-off-by: Peter Chen <peter.c...@nxp.com> --- arch/arm/boot/dts/imx6q-evi.dts | 25 +++-- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/arch/arm/boot/dts/imx6q-evi.dts b/arch/arm/boot/dts/imx6q-evi.dts index 4fa56

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

2016-08-15 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 v6 2/8] power: add power sequence library

2016-08-15 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> Reviewed-by: Matthias Kaehlcke <m.

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

2016-08-15 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 v6 3/8] binding-doc: usb: usb-device: add optional properties for power sequence

2016-08-15 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 v6 0/8] power: add power sequence library

2016-08-15 Thread Peter Chen
er'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 Peter Chen (6): binding-doc: power: pwrseq-generic: add binding doc for generic power sequence library power: add power sequence library binding-doc:

Re: [PATCH] usb: chipidea: udc: don't touch DP when controller is in host mode

2016-08-15 Thread Peter Chen
On Fri, Aug 12, 2016 at 09:18:59AM +, Jun Li wrote: > Hi, > > -Original Message- > > From: Peter Chen [mailto:hzpeterc...@gmail.com] > > Sent: Friday, August 12, 2016 4:48 PM > > To: Jun Li <jun...@nxp.com> > > Cc: Peter Chen <peter.c...@nxp.c

RE: [lkp] [usb] ad05399d68: BUG: unable to handle kernel NULL pointer dereference at 0000000000000012

2016-08-15 Thread Peter Chen
and said it is a false report. see below. Would you please double confirm it? On Wed, Jul 13, 2016 at 01:55:26AM +, Peter Chen wrote: > > >>-Original Message- >>From: lkp-requ...@eclists.intel.com >>[mailto:lkp-requ...@eclists.intel.com] On Behalf Of kernel test

Re: [PATCH] usb: chipidea: udc: don't touch DP when controller is in host mode

2016-08-12 Thread Peter Chen
> return 0; > > pm_runtime_get_sync(>gadget.dev); > -- Would you show me how to reproduce it? I can't reproduce it. According to your description, the ci->vbus_active is false, then the pullup operation will NOT do real pull up. -- Best R

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

2016-08-11 Thread Peter Chen
PAD_GPIO_0__GPIO1_IO00 0x1b0b0 > - >; > - }; > - > - pinctrl_usbh1_hubreset: usbh1hubresetgrp { > - fsl,pins = < > MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x1b0b0 > >; > }; This changes remind me that I need to change the same thing for udoo board. -- 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: [PATCHES] ARM: dts: update udoo and evi hubs to use pwrseq

2016-08-11 Thread Peter Chen
> and remove those lines from imx6qdl-udoo.dtsi in patch 2 (formerly patch 6) > Finally I make the change in imx6q-evi.dts and hope is can be slipped into > the series with the others. > Thanks, I will send them at next revision -- Best Regards, Peter Chen -- To unsubscribe

Re: [PATCH] usb: core: Add runtime resume checking

2016-08-11 Thread Peter Chen
e failed. > >> > > > > What host controller driver you are using? Assume you are using > > xhci-plat.c. The problem for you is this driver does not implement > > Yes. I use xhci-plat.c. > > > runtime pm operations, so the flag HCD_FLAG_HW_ACCESSIBLE is not set. >

Re: [PATCH] usb: core: Add runtime resume checking

2016-08-11 Thread Peter Chen
On Thu, Aug 11, 2016 at 04:07:21PM +0800, Baolin Wang wrote: > Hi Peter, > > On 11 August 2016 at 14:54, Peter Chen <hzpeterc...@gmail.com> wrote: > > On Thu, Aug 11, 2016 at 11:08:52AM +0800, Baolin Wang wrote: > >> Hi Alan, > >> > >

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

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

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

2016-08-11 Thread Peter Chen
pointer for socket buffer before using it. Peter Chen (4): usb: gadget: composite: fix dereference after null check coverify warning usb: gadget: u_ether: fix dereference after null check coverify warning usb: gadget: function: f_eem: socket buffer may be NULL usb: gadget: function

[PATCH v2 4/4] usb: gadget: function: f_rndis: socket buffer may be NULL

2016-08-11 Thread Peter Chen
In eth_start_xmit, the socket buffer may be NULL. So, add NULL pointer check at .wrap API. Signed-off-by: Peter Chen <peter.c...@nxp.com> --- drivers/usb/gadget/function/f_rndis.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/gadget/function/f_rndis.c b/drivers/usb/

[PATCH v2 3/4] usb: gadget: function: f_eem: socket buffer may be NULL

2016-08-11 Thread Peter Chen
In eth_start_xmit, the socket buffer may be NULL. So, add NULL pointer check at .wrap API. Signed-off-by: Peter Chen <peter.c...@nxp.com> --- drivers/usb/gadget/function/f_eem.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/usb/gadget/function/f_ee

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

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

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

2016-08-11 Thread Peter Chen
On Wed, Aug 10, 2016 at 02:20:18PM +0300, Felipe Balbi wrote: > > Hi, > > Peter Chen <hzpeterc...@gmail.com> writes: > > 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. >

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

2016-08-11 Thread Peter Chen
y. > > > >Signed-off-by: Stefan Wahren <stefan.wah...@i2se.com> > >Signed-off-by: Peter Chen <peter.c...@nxp.com> > > > >diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c > >index fdcdcc6..761b804 100644 > >--- a/d

Re: [PATCH v2] usb: core: Add runtime resume checking in choose_wakeup()

2016-08-11 Thread Peter Chen
also. > > But now it won't, it just resume usb device not xHCI controller. I > suppose mainline kernel does not sopport this now. > Why? It works ok at my environment. The controller is the ancestor of the USB device, if the USB device would like to be woken up, the controller wi

Re: [PATCH] usb: core: Add runtime resume checking

2016-08-11 Thread Peter Chen
bad. > > > > If the wakeup setting needs to be changed when the system suspend > > begins, then you have to power-on the controller to make that change. > > > > Given a choice between using a little power or behaving incorrectly, > > you should choose to use the po

Re: [PATCH] usb: core: Add runtime resume checking

2016-08-10 Thread Peter Chen
On Wed, Aug 10, 2016 at 02:43:50PM +0800, Baolin Wang wrote: > Hi Peter, > > On 10 August 2016 at 14:18, Peter Chen <hzpeterc...@gmail.com> wrote: > > On Wed, Aug 10, 2016 at 10:33:31AM +0800, Baolin Wang wrote: > >> Hi Greg, > >> >

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

2016-08-10 Thread Peter Chen
On Wed, Aug 10, 2016 at 09:00:15AM +, Jun Li wrote: > Hi, Peter > > > -Original Message- > > From: linux-usb-ow...@vger.kernel.org [mailto:linux-usb- > > ow...@vger.kernel.org] On Behalf Of Peter Chen > > Sent: Wednesday, August 10, 2016 11:12 AM &

Re: [PATCH] usb: core: Add runtime resume checking

2016-08-10 Thread Peter Chen
t;> - pm_runtime_resume(>dev); > >> + if (udev->state == USB_STATE_SUSPENDED && w != > >> udev->do_remote_wakeup) { > >> + ret = pm_runtime_resume(>dev); > >> + if (ret == -ESHUTDOWN) > >>

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