[PATCH v12 06/13] usb: chipidea: add otg_cap attribute for otg capable

2013-07-11 Thread Peter Chen
is otg capable, defaultly, we follow the rule that if DCCPARAMS_DC and DCCPARAMS_HC are both 1 at CAP_DCCPARAMS are otg capable, but if there is exception, the platform can override it by device tree or platform data. Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/core.c

[PATCH v12 01/13] usb: chipidea: add vbus regulator control

2013-07-11 Thread Peter Chen
vbus; when the host role finishes, it closes vbus. We put vbus operation to host as host is the only vbus user, When we are at host mode, the vbus is on, when we are not at host mode, vbus should be off. Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/host.c | 23

[PATCH v12 03/13] usb: chipidea: udc: otg_set_peripheral is useless for some chipidea users

2013-07-11 Thread Peter Chen
It is useless at below cases: - If we implement both usb host and device at chipidea driver. - If we don't need phy-otg. Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/udc.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/drivers/usb

[PATCH v12 02/13] usb: chipidea: imx: remove vbus regulator operation

2013-07-11 Thread Peter Chen
Since we have added vbus reguatlor operation at common host file (chipidea/host.c), the glue layer vbus operation isn't needed any more. Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/ci_hdrc_imx.c | 30 +++--- 1 files changed, 7 insertions

[PATCH v12 07/13] usb: chipidea: disable all interrupts and clear all interrupts status

2013-07-11 Thread Peter Chen
During the initialization, it needs to disable all interrupts enable bit as well as clear all interrupts status bits to avoid exceptional interrupt. Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/core.c | 11 ++- 1 files changed, 10 insertions(+), 1

[PATCH v12 04/13] usb: chipidea: otg: Add otg file used to access otgsc

2013-07-11 Thread Peter Chen
This file is mainly used to access otgsc currently, it may add otg related things in the future. Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/Makefile |2 +- drivers/usb/chipidea/bits.h | 10 drivers/usb/chipidea/core.c |3 +- drivers/usb

[PATCH v12 12/13] usb: chipidea: udc: .pullup is valid when vbus is on at CI_HDRC_PULLUP_ON_VBUS

2013-07-11 Thread Peter Chen
-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/udc.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 45abf4d..b7ead5f 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c

[PATCH v12 05/13] usb: chipidea: Add role init and destory APIs

2013-07-11 Thread Peter Chen
- The role's init will be called at probe procedure. - The role's destory will be called at fail patch at probe and driver's removal. - The role's start/stop will be called when specific role has started. Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/core.c | 10

[PATCH v12 09/13] usb: chipidea: add vbus interrupt handler

2013-07-11 Thread Peter Chen
We add vbus interrupt handler at ci_otg_work, it uses OTGSC_BSV(at otgsc) to know it is connect or disconnet event. Meanwhile, we introduce two flags id_event and b_sess_valid_event to indicate it is an id interrupt or a vbus interrupt. Signed-off-by: Peter Chen peter.c...@freescale.com

[PATCH v12 13/13] usb: chipidea: udc: fix the oops when plugs in usb cable after rmmod gadget

2013-07-11 Thread Peter Chen
+0x120/0x148) r9:412fc09a r8:1000406a r7:80712d20 r6:10c03c7d r5:0001 r4:806e2008 Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/udc.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb

[PATCH v12 08/13] usb: chipidea: move otg relate things to otg file

2013-07-11 Thread Peter Chen
Move otg relate things to otg file. Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/core.c | 63 +-- drivers/usb/chipidea/otg.c | 57 +- drivers/usb/chipidea/otg.h |2 + 3 files

[PATCH v12 11/13] usb: chipidea: udc: misuse flag CI_HDRC_REGS_SHARED and CI_HDRC_PULLUP_ON_VBUS

2013-07-11 Thread Peter Chen
module), the controller can run if vbus is on (CI_HDRC_PULLUP_ON_VBUS), it also does not relate to shared register. Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/udc.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/usb/chipidea

Re: [PATCH v12 02/13] usb: chipidea: imx: remove vbus regulator operation

2013-07-11 Thread Peter Chen
met this problem at FSL mx6-auto board which uses gpio-expendor chip max7310 as regulator-gpio for enable vbus output. -- 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

Re: [PATCH v12 10/13] usb: chipidea: add wait vbus lower than OTGSC_BSV before role starts

2013-07-11 Thread Peter Chen
On Thu, Jul 11, 2013 at 09:24:56AM +0200, Marc Kleine-Budde wrote: On 07/11/2013 08:27 AM, Peter Chen wrote: When the gadget role starts, we need to make sure the vbus is lower than OTGSC_BSV, or there will be an vbus interrupt since we use B_SESSION_VALID as vbus interrupt to indicate

Re: linux-next: Tree for Jul 11 (usb/chipidea)

2013-07-11 Thread Peter Chen
with host. http://marc.info/?l=linux-usbm=137331577204167w=2 -- BR, 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 v12 06/13] usb: chipidea: add otg_cap attribute for otg capable

2013-07-11 Thread Peter Chen
On Thu, Jul 11, 2013 at 05:36:10PM +0200, Marek Vasut wrote: Dear Peter Chen, Since we need otgsc to know vbus's status at some chipidea controllers even it is peripheral-only mode. Besides, some SoCs (eg, AR9331 SoC) don't have otgsc register even the DCCPARAMS_DC and DCCPARAMS_HC

Re: [PATCH v12 00/13] Add tested id switch and vbus connect detect support for Chipidea

2013-07-11 Thread Peter Chen
no board on hand, let me see if I can find 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 v12 06/13] usb: chipidea: add otg_cap attribute for otg capable

2013-07-12 Thread Peter Chen
On Fri, Jul 12, 2013 at 11:12:01AM +0300, Alexander Shishkin wrote: Peter Chen peter.c...@freescale.com writes: Since we need otgsc to know vbus's status at some chipidea controllers even it is peripheral-only mode. Besides, some SoCs (eg, AR9331 SoC) don't have otgsc register even

Re: [PATCH v12 00/13] Add tested id switch and vbus connect detect support for Chipidea

2013-07-12 Thread Peter Chen
, 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 v12 06/13] usb: chipidea: add otg_cap attribute for otg capable

2013-07-12 Thread Peter Chen
On Fri, Jul 12, 2013 at 12:42:10PM +0300, Alexander Shishkin wrote: Peter Chen peter.c...@freescale.com writes: On Fri, Jul 12, 2013 at 11:12:01AM +0300, Alexander Shishkin wrote: Peter Chen peter.c...@freescale.com writes: Since we need otgsc to know vbus's status at some chipidea

Re: [PATCH] USB: global suspend and remote wakeup don't mix

2013-07-15 Thread Peter Chen
On Fri, Jul 12, 2013 at 10:57:25AM -0400, Alan Stern wrote: On Fri, 12 Jul 2013, Peter Chen wrote: - For hub cases, since you said it must send suspend to hub at global suspend case (system suspend procedure), this suspend request procedure can't be skipped. No -- it is necessary

Re: [PATCH v12 00/13] Add tested id switch and vbus connect detect support for Chipidea

2013-07-16 Thread Peter Chen
; + }; + usbphy1_pins_a: usbphy1@0 { reg = 0; fsl,pinmux-ids = -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord

Re: [PATCH v12 06/13] usb: chipidea: add otg_cap attribute for otg capable

2013-07-16 Thread Peter Chen
On Fri, Jul 12, 2013 at 12:42:10PM +0300, Alexander Shishkin wrote: Peter Chen peter.c...@freescale.com writes: Hi Alex, do you have any other comments for this patchset? If you haven't, I will send the v13 patchset with current comments. -- Best Regards, Peter Chen -- To unsubscribe from

Re: [PATCH 1/2] usb: chipidea: kconfig: using USB_EHCI_HCD instead of USB for dependency

2013-07-16 Thread Peter Chen
On Mon, Jul 8, 2013 at 3:42 PM, Peter Chen peter.c...@freescale.com wrote: Chipidea controller is an EHCI compatible controller, with current kconfig, even CONIFG_USB_EHCI_HCD is not chosen, but CONFIG_USB is there, the chipidea code still will be compiled, in fact, it is useless. Signed-off

Re: [PATCH] usb: udc: add gadget state kobject uevent

2013-07-16 Thread Peter Chen
, what Rong wants is udev can be notified the udc state changes, like connect/disconnect event. Currently, we only export it to /sys. -- 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

Re: usb device getting disconnected

2012-08-07 Thread Peter Chen
Cc: 'Sadasivan Shaiju'; 'Peter Chen'; 'USB list' Subject: RE: usb device getting disconnected and connect back again. On Sun, 29 Jul 2012, shaiju shaiju wrote: Hi Alen, This error is intermittent . It doesn't happen always . Then there may not be any way to determine the cause

[PATCH 1/1] usb: hcd: mark controller's suspend routine as async

2012-08-13 Thread Peter Chen
is the parent of root hub. Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/core/hcd.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index bc84106..29a708a 100644 --- a/drivers/usb/core/hcd.c +++ b

Re: Potential fsg-state problem at file_storage.c

2012-08-16 Thread Peter Chen
Alan, will you submit a patch to add reset callback for file_storage? If not, I can help send a patch. On Thu, Aug 16, 2012 at 9:53 AM, Chen Peter-B29397 b29...@freescale.com wrote: that sounds like a plan :-) Tomorrow I can send a series of patches starting off the split, then people can

Re: [PATCH 3/3] usb: musb: gadget: implement proper -reset handling

2012-08-16 Thread Peter Chen
On Fri, Aug 17, 2012 at 12:10 AM, Rajaram R rajaram.officem...@gmail.com wrote: On Thu, Aug 16, 2012 at 11:51 AM, Felipe Balbi ba...@ti.com wrote: After introducing the new -reset method on struct usb_gadget_driver, UDC drivers are required to implement proper handling for it. This patch

Re: [RFC] How to handle delays in isochronous transfers?

2012-09-02 Thread Peter Chen
How should the lower USB layers handle delays in transferring isochronous data? I'm asking you because the most common usages of isochronous transfers are for audio and video. Here's an example to illustrate what I mean. Typically an audio or video driver will keep a queue of around 10 ms

Re: [RFC] How to handle delays in isochronous transfers?

2012-09-03 Thread Peter Chen
In such a situation, the delay is much bigger than the device's buffer, so just sending more samples afterwards will not help. It is ISO transfer, if the delay is too much, and the buffer at device side is empty, it is normal the screen is stopped like we watch movie on Internet

Re: [RFC] How to handle delays in isochronous transfers?

2012-09-06 Thread Peter Chen
Here's the problem we face: The class driver submits packets 1, 2, 3, and 4. They get sent properly, but the completion interrupt is delayed. As a result, the class driver's completion handler doesn't get called until too late; the frames for packets 5 - 44 have already expired. The data

Re: [RFC] How to handle delays in isochronous transfers?

2012-09-07 Thread Peter Chen
On Fri, Sep 7, 2012 at 11:44 PM, Alan Stern st...@rowland.harvard.edu wrote: On Fri, 7 Sep 2012, Peter Chen wrote: Here's the problem we face: The class driver submits packets 1, 2, 3, and 4. They get sent properly, but the completion interrupt is delayed. As a result, the class

Re: [RFC] How to handle delays in isochronous transfers?

2012-09-10 Thread Peter Chen
If the feedback is supported, the device will know host sends data slowly, it will give speed up feedback information after it receives packet 5 or other packets depends on its interval at descriptor. At this information, it can tell the host to increase the packet size, then the

[PATCH 1/4] usb: phy: add notify_suspend/notify_resume callback

2012-09-13 Thread Peter Chen
-by: Peter Chen peter.c...@freescale.com --- include/linux/usb/phy.h | 44 +--- 1 files changed, 37 insertions(+), 7 deletions(-) diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h index 06b5bae..45e2235 100644 --- a/include/linux/usb/phy.h +++ b

[PATCH 2/4] usb: mxs-phy: implement notify_suspend/notify_resume callback

2012-09-13 Thread Peter Chen
/ref_manual/IMX23RM.pdf Freescale i.MX SoC, i.mx23, i.mx28 and i.mx6(i.mx6SL does not need to follow the 3rd rule) need to follow above rules. Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/otg/mxs-phy.c | 56 +++- 1 files changed, 44

[PATCH 3/4] usb: chipidea: add phy notify at suspend/resume procedure

2012-09-13 Thread Peter Chen
When there is a device at the port, it needs to notify PHY driver bus's status during bus suspend/resume procedure for some freescale i.mx SoC (i.mx23, i.mx28, i.mx6). Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/host.c | 75

[PATCH 4/4] usb: refine phy notify operation during connection and disconnection

2012-09-13 Thread Peter Chen
should be: 1. Set connect notify after the second bus reset. 2. Set disconnect notify after disconnection. Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/core/hub.c | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/usb/core/hub.c b

[PATCH 1/2] usb: phy: rename enum usb_otg_state to usb_state

2012-09-16 Thread Peter Chen
These states are not all otg specific, and they stands for general usb state. Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/otg/isp1301_omap.c |4 ++-- drivers/usb/otg/otg.c | 12 +++- drivers/usb/otg/otg_fsm.c |6 +++--- include/linux/usb

[PATCH 2/2] usb: phy: rename otg.c to phy.c

2012-09-16 Thread Peter Chen
The operations in current otg.c are actually for USB PHY's Move it from drivers/usb/otg/ to drivers/usb/phy/ Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/otg/Makefile |3 - drivers/usb/otg/otg.c| 239 -- drivers/usb/phy

Re: [PATCH v2 2/2] usb: phy: rename otg.c to phy.c

2012-09-17 Thread Peter Chen
On Tue, Sep 18, 2012 at 12:31:19AM -0300, Fabio Estevam wrote: On Mon, Sep 17, 2012 at 10:38 PM, Peter Chen peter.c...@freescale.com wrote: The operations in current otg.c are actually for USB PHY's. Move it from drivers/usb/otg/ to drivers/usb/phy/ Signed-off-by: Peter Chen peter.c

Re: [PATCH 02/12] usb: chipidea: udc: add pullup fuction, needed by the uvc gadget

2012-09-20 Thread Peter Chen
On Wed, Sep 12, 2012 at 7:58 PM, Alexander Shishkin alexander.shish...@linux.intel.com wrote: From: Michael Grzeschik m.grzesc...@pengutronix.de Add function to physicaly enable or disable of pullup connection on the USB-D+ line. The uvc gaget will fail, if this function is not implemented.

Re: Remote wakeup vs. hub suspend

2012-09-24 Thread Peter Chen
On Mon, Sep 24, 2012 at 12:23 AM, Alan Stern st...@rowland.harvard.edu wrote: It turns out that the USB-2 spec does not take into account the possibility of the race between a hub being suspended and one of its ports receiving a remote wakeup request from downstream. The flowcharts and

Re: Remote wakeup vs. hub suspend

2012-09-26 Thread Peter Chen
For us to do this would be a little difficult. System suspend is easy enough to handle because we don't actually need to put any external ports into suspend; the entire bus will go into global suspend when the root hub is suspended. In fact, this is what we should be doing now (but we

[PATCH RESEND v2 2/2] usb: phy: rename otg.c to phy.c

2012-10-08 Thread Peter Chen
The operations in current otg.c are actually for USB PHY's. Move it from drivers/usb/otg/ to drivers/usb/phy/ Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/otg/Makefile |3 --- drivers/usb/phy/Makefile |3 +++ drivers/usb/{otg/otg.c = phy

[PATCH RESEND v2 0/2] Some tiny changes for split phy from otg

2012-10-08 Thread Peter Chen
Hi Felipe, Below are two patches to split some phy related things from otg. Changes for v2: - Use git mv / git format -M to create patch for rename otg.c to phy.c Peter Chen (2): usb: phy: rename enum usb_otg_state to usb_state usb: phy: rename otg.c to phy.c drivers/usb/otg/Makefile

[PATCH RESEND v2 1/2] usb: phy: rename enum usb_otg_state to usb_state

2012-10-08 Thread Peter Chen
These states are not all otg specific, and they stands for general usb state. Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/otg/isp1301_omap.c |4 ++-- drivers/usb/otg/otg.c | 12 +++- drivers/usb/otg/otg_fsm.c |6 +++--- include/linux/usb

[PATCH v2 4/4] usb: refine phy notify operation during connection and disconnection

2012-10-08 Thread Peter Chen
should be: 1. Set connect notify after the second bus reset. 2. Set disconnect notify after disconnection. Signed-off-by: Peter Chen peter.c...@freescale.com Tested-by: Mike Thompson mpthomp...@gmail.com --- Changes for v2: - Add Tested-by: Mike Thompson mpthomp...@gmail.com drivers/usb/core

[PATCH v2 0/4] Add PHY nofity for some i.mx SoCs

2012-10-08 Thread Peter Chen
. Set disconnect notify after disconnection. 3. Set suspend nofity after bus goes to suspend (portsc.suspendM=1). 4. Set resume notify after resume (portsc.fpr=0). Peter Chen (4): usb: phy: add notify_suspend/notify_resume callback usb: mxs-phy: implement notify_suspend/notify_resume callback

[PATCH v2 2/4] usb: mxs-phy: implement notify_suspend/notify_resume callback

2012-10-08 Thread Peter Chen
/ref_manual/IMX23RM.pdf Freescale i.MX SoC, i.mx23, i.mx28 and i.mx6(i.mx6SL does not need to follow the 3rd rule) need to follow above rules. Signed-off-by: Peter Chen peter.c...@freescale.com Tested-by: Mike Thompson mpthomp...@gmail.com --- Changes for v2: - Add Tested-by: Mike Thompson mpthomp

Re: [PATCH v2 4/4] usb: refine phy notify operation during connection and disconnection

2012-10-10 Thread Peter Chen
git bisect might happen to hit a commit in between the two patches, and their kernels won't compile. That's not acceptable. So, a good practice is merging .h (changed API) and .c(using this API) into a commit? Alan Stern -- Best Regards, Peter Chen -- To unsubscribe from this list

Re: About resume time optimization for bus resume routine

2012-10-11 Thread Peter Chen
On Thu, Oct 11, 2012 at 03:20:51PM -0400, Alan Stern wrote: On Thu, 11 Oct 2012, Peter Chen wrote: There is a port on the root hub with suspend status clear and enabled status set (which implies there must be a device attached to the port, because disconnected ports can't

[PATCH v3 1/1] usb: phy: change phy notify functions

2012-10-12 Thread Peter Chen
be: 1. Set connect notify after the second bus reset. 2. Set disconnect notify after disconnection. 3. Set suspend nofity after bus goes to suspend (portsc.suspendM=1). 4. Set resume notify after resume (portsc.fpr=0). Signed-off-by: Peter Chen peter.c...@freescale.com Tested-by: Mike Thompson mpthomp

[PATCH v4 1/1] usb: phy: change phy notify functions

2012-10-15 Thread Peter Chen
be: 1. Set connect notify after the second bus reset. 2. Set disconnect notify after disconnection. 3. Set suspend nofity after bus goes to suspend (portsc.suspendM=1). 4. Set resume notify after resume (portsc.fpr=0). Signed-off-by: Peter Chen peter.c...@freescale.com Tested-by: Mike Thompson mpthomp

Re: About resume time optimization for bus resume routine

2012-10-16 Thread Peter Chen
On Fri, Oct 12, 2012 at 11:04:25AM -0400, Alan Stern wrote: On Fri, 12 Oct 2012, Peter Chen wrote: Taking EHCI controller as an example, it just needs to change ehci_bus_resume, if there is any enabled, unsuspended port, set hcd-unsuspended_device_on_port We don't need to do

[PATCH 1/1] USB: EHCI: add condition for delay during the resume

2012-10-16 Thread Peter Chen
. Tested it at Freescale i.mx6q Sabrelite board. Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/host/ehci-hub.c | 22 +- 1 files changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index c788022

Re: [PATCH 1/1] USB: EHCI: add condition for delay during the resume

2012-10-16 Thread Peter Chen
On Tue, Oct 16, 2012 at 10:14:43AM -0400, Alan Stern wrote: On Tue, 16 Oct 2012, Peter Chen wrote: Without this condition, all controllers will do this delay, and increase the resume time. Only enabled and unsuspended port needs this delay, but Some buggy hardware(like Synopsys usb

Re: [PATCH v4 1/1] usb: phy: change phy notify functions

2012-10-16 Thread Peter Chen
On Tue, Oct 16, 2012 at 09:36:46AM +0800, Peter Chen wrote: Hi Felipe Alex, Do you have any comments for this patch? The patch includes both API change and caller change. The main changes like below: - add notify_suspend/notify_resume callback This let usb phy driver has the chance

RE: [RFC PATCH 1/1] usb: udc-core: redo usb_gadget_probe_driver when the udc is ready

2014-04-02 Thread Peter Chen
Hi Peter, On 04/02/2014 10:47 AM, Peter Chen wrote: We have historic problem that the gadget will not work if the gadget is build-in and the udc driver is defered probe due to some resources are not ready. Below links are related to this problem. http://marc.info/?l=linux-usbm

RE: [RFC PATCH 1/1] usb: udc-core: redo usb_gadget_probe_driver when the udc is ready

2014-04-03 Thread Peter Chen
On 04/03/2014 03:52 AM, Peter Chen wrote: Hi Peter, On 04/02/2014 10:47 AM, Peter Chen wrote: We have historic problem that the gadget will not work if the gadget is build-in and the udc driver is defered probe due to some resources are not ready. Below links are related

Re: [PATCH v6 07/11] usb: chipidea: OTG HNP and SRP fsm implementation.

2014-04-04 Thread Peter Chen
at otg_fsm situation. if (ci-vbus_active) { spin_lock_irqsave(ci-lock, flags); hw_device_reset(ci, USBMODE_CM_DC); -- 1.7.9.5 -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message

Re: i.MX6 UDC driver fsl-usb2-udc versus chipidea driver

2014-04-04 Thread Peter Chen
driver, try to improve gadgetfs, and send as many as requests to udc driver. -- 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 v7 01/11] usb: chipidea: usb OTG fsm initialization.

2014-04-08 Thread Peter Chen
CONFIG_USB_OTG_FSM + +int ci_hdrc_otg_fsm_init(struct ci_hdrc *ci); + +#else + +static inline int ci_hdrc_otg_fsm_init(struct ci_hdrc *ci) +{ + return 0; +} + +#endif + +#endif /* __DRIVERS_USB_CHIPIDEA_OTG_FSM_H */ -- 1.7.9.5 -- Best Regards, Peter Chen -- To unsubscribe from

Re: [PATCH v7 03/11] usb: chipidea: host: init otg port number.

2014-04-08 Thread Peter Chen
; Why update this patch? The ci-transceiver-otg is only allocated at otg_fsm_mode, isn't it? + } if (ci-platdata-flags CI_HDRC_DISABLE_STREAMING) hw_write(ci, OP_USBMODE, USBMODE_CI_SDIS, USBMODE_CI_SDIS); -- 1.7.9.5 -- Best Regards, Peter Chen

Re: [PATCH v7 00/11] Add USB OTG HNP and SRP support on Chipidea usb driver

2014-04-08 Thread Peter Chen
/otg_fsm.h -- 1.7.9.5 -- 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 1/1] usb: usb-common: fix typo for usb_state_string

2014-04-09 Thread Peter Chen
%s/addresssed/addressed Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/usb-common.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/usb/usb-common.c b/drivers/usb/usb-common.c index d771870..6dfd30a 100644 --- a/drivers/usb/usb-common.c +++ b

Re: [PATCH v8 00/11] Add USB OTG HNP and SRP support on Chipidea usb driver

2014-04-10 Thread Peter Chen
/chipidea/otg_fsm.h -- 1.7.9.5 -- 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 v9 07/11] usb: chipidea: OTG HNP and SRP fsm implementation.

2014-04-10 Thread Peter Chen
. pm_runtime_get_sync(ci-gadget.dev); + blank line if (ci-vbus_active) { spin_lock_irqsave(ci-lock, flags); hw_device_reset(ci, USBMODE_CM_DC); -- 1.7.9.5 -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line unsubscribe linux

Re: [PATCH v9 07/11] usb: chipidea: OTG HNP and SRP fsm implementation.

2014-04-10 Thread Peter Chen
; + } + pm_runtime_get_sync(ci-gadget.dev); + if (ci-vbus_active) { spin_lock_irqsave(ci-lock, flags); hw_device_reset(ci, USBMODE_CM_DC); -- 1.7.9.5 -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body

Re: i.MX51 ChipIdea USB device endpoints questions

2014-04-10 Thread Peter Chen
, the name is ep[0..7]in. What's the reason you want to customize endpoint number? Currently, it will allocate the smallest un-used endpoint number for application. -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message

RE: [PATCH v9 07/11] usb: chipidea: OTG HNP and SRP fsm implementation.

2014-04-10 Thread Peter Chen
) { spin_lock_irqsave(ci-lock, flags); hw_device_reset(ci, USBMODE_CM_DC); -- 1.7.9.5 -- 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

Re: libusbg and vbus detection for UDC driver

2014-04-10 Thread Peter Chen
already been exported (see udc-core.c), you only need to call usb_gadget_set_state(gadget, USB_STATE_ATTACHED) at your udc for cable connection. -- 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

Re: i.MX51 ChipIdea USB device endpoints questions

2014-04-13 Thread Peter Chen
) { desc_source.bEndpointAddress = USB_DIR_IN | 2; desc_sink.bEndpointAddress = USB_DIR_OUT | 2; } Peter Thanks, Dave -Original Message- From: Peter Chen [mailto:peter.c...@freescale.com] Sent: Thursday, April 10, 2014 9:43 PM To: Ebright, Dave Cc: linux-usb@vger.kernel.org Subject: Re

Re: [PATCH v10 00/11] Add USB OTG HNP and SRP support on Chipidea usb driver

2014-04-14 Thread Peter Chen
-chipidea-usb-otg create mode 100644 Documentation/usb/chipidea.txt create mode 100644 drivers/usb/chipidea/otg_fsm.c create mode 100644 drivers/usb/chipidea/otg_fsm.h -- 1.7.9.5 -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line unsubscribe linux-usb

RE: USB OTG support on mx27pdk

2014-04-15 Thread Peter Chen
Hi, I am trying to add USBOTG support to mx27pdk with the following dts patch: --- a/arch/arm/boot/dts/imx27-pdk.dts +++ b/arch/arm/boot/dts/imx27-pdk.dts @@ -78,6 +78,14 @@ status = okay; }; +usbotg { + pinctrl-names = default; + pinctrl-0 =

RE: USB OTG support on mx27pdk

2014-04-15 Thread Peter Chen
On Wed, Apr 16, 2014 at 12:23 AM, Peter Chen peter.c...@freescale.com wrote: Please check if below patch is existed commit 3b5d3e6845bfe68777d069886b0d1cd5f23b9d58 Author: Chris Ruehl chris.ru...@gtsys.com.hk Date: Fri Jan 10 13:51:29 2014 +0800 usb: chipidea: Fix Internal

RE: [PATCH v10 00/11] Add USB OTG HNP and SRP support on Chipidea usb driver

2014-04-16 Thread Peter Chen
On Tue, Apr 15, 2014 at 02:48:44PM +0800, Peter Chen wrote: On Tue, Apr 15, 2014 at 09:43:04AM +0800, Li Jun wrote: On Mon, Apr 14, 2014 at 08:45:13PM +0800, Peter Chen wrote: On Mon, Apr 14, 2014 at 10:22:32AM +0800, Li Jun wrote: On Mon, Apr 14, 2014 at 09:37:50AM +0800, Li Jun

[PATCH 1/1] usb: chipidea: add proper delay for waiting correct PHY status

2014-04-17 Thread Peter Chen
. This patch add 2ms delay after phy has initialized, and clear the unexpected status after that. Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/core.c | 26 +- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/usb/chipidea

RE: USB OTG support on mx27pdk

2014-04-19 Thread Peter Chen
and read the viewport return 0's only. Signed-off-by: Chris Ruehl chris.ru...@gtsys.com.hk Signed-off-by: Peter Chen peter.c...@freescale.com Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org Then USB OTG port detected the USB pen driver fine: usbcore

RE: USB OTG support on mx27pdk

2014-04-19 Thread Peter Chen
Shawn-R65073 Subject: Re: USB OTG support on mx27pdk On Sat, Apr 19, 2014 at 4:32 AM, Peter Chen peter.c...@freescale.com wrote: The below patch is intended to fix above issues for all platforms, I have tested it at imx6 platform, if possible, have a test at imx25/imx27 please. I don't

RE: USB OTG support on mx27pdk

2014-04-20 Thread Peter Chen
Sun, 20 Apr 2014 00:48:28 + от Peter Chen peter.c...@freescale.com: -Original Message- From: Fabio Estevam [mailto:feste...@gmail.com] Sent: Sunday, April 20, 2014 1:10 AM To: Chen Peter-B29397 Cc: Michael Grzeschik; Alexander Shiyan; linux-arm- ker

Re: [PATCH v2 0/3] Some update for USB OTG

2014-04-20 Thread Peter Chen
On Mon, Mar 31, 2014 at 11:44:13PM -0500, Felipe Balbi wrote: On Tue, Apr 01, 2014 at 08:36:58AM +0800, Peter Chen wrote: On Thu, Mar 13, 2014 at 03:25:19PM +0800, Li Jun wrote: From: Li Jun b47...@freescale.com Hi Felipe, Two for fsm, the other one is to delete

Re: [PATCH] usb: phy: otg-fsm: export symbol of otg_statemachine

2014-04-21 Thread Peter Chen
. -- 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 v12 01/12] usb: phy: otg-fsm: export symbol of otg_statemachine

2014-04-21 Thread Peter Chen
On Tue, Apr 22, 2014 at 08:45:24AM +0800, Li Jun wrote: From: Li Jun b47...@freescale.com This patch exports symbol of otg_statemachine for kernel module can use it. Signed-off-by: Li Jun b47...@freescale.com --- drivers/usb/phy/phy-fsm-usb.c |1 + 1 file changed, 1

RE: [RESEND PATCH 1/1] usb: phy: delete CONFIG_USB_OTG_FSM

2014-04-22 Thread Peter Chen
On Wed, Mar 05, 2014 at 08:52:24AM +0800, Peter Chen wrote: We already have CONFIG_USB_OTG which can cover all CONFIG_USB_OTG_FSM does. Cc: Jun Li b47...@freescale.com Cc: Anton Tikhomirov av.tikhomi...@samsung.com Signed-off-by: Peter Chen peter.c...@freescale.com

[PATCH 0/1] Chipidea Fix for v3.15

2014-04-23 Thread Peter Chen
Hi Greg, This patch fixes a hang issue if phy clock is not there and we want to configure phy through portsc.pts. Peter Chen (1): usb: chipidea: coordinate usb phy initialization for different phy type drivers/usb/chipidea/core.c | 37 ++--- 1 files

Re: [PATCH v12 00/12] Add USB OTG HNP and SRP support on Chipidea usb driver

2014-04-23 Thread Peter Chen
/chipidea/otg_fsm.h -- 1.7.9.5 I find many of your subjects has . at last, it doesn't need, I fix them this time. Thanks for your work for otg fsm for chipidea, I will send them to Greg. -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line unsubscribe linux-usb

[PATCH 01/19] usb: chipidea: usbmisc: Add USB support for i.MX25/i.MX35 CPUs

2014-04-23 Thread Peter Chen
From: Denis Carikli de...@eukrea.com This adds the i.MX25 and the i.MX35 support in the ChipIdea usbmisc driver. The i.MX25 and i.MX35 usb controllers are similar enough to be able to use the same code. Signed-off-by: Peter Chen peter.c...@freescale.com Signed-off-by: Denis Carikli de

[PATCH 06/19] usb: chipidea: add proper delay for waiting correct PHY status

2014-04-23 Thread Peter Chen
. This patch add 2ms delay after phy has initialized, and clear the unexpected status after that. Signed-off-by: Peter Chen peter.c...@freescale.com Tested-by: Li Jun b47...@freescale.com --- drivers/usb/chipidea/core.c | 26 +- 1 files changed, 13 insertions(+), 13

[PATCH 08/19] usb: phy: otg-fsm: export symbol of otg_statemachine

2014-04-23 Thread Peter Chen
From: Li Jun b47...@freescale.com This patch exports symbol of otg_statemachine for kernel module can use it. Acked-by: Felipe Balbi ba...@ti.com Signed-off-by: Peter Chen peter.c...@freescale.com Signed-off-by: Li Jun b47...@freescale.com --- drivers/usb/phy/phy-fsm-usb.c |1 + 1 files

[PATCH 00/19] Chipidea Patches for v3.16

2014-04-23 Thread Peter Chen
and SRP Documentation: usb: add chipidea.txt for how to demo usb OTG HNP and SRP Peter Chen (2): usb: chipidea: coordinate usb phy initialization for different phy type usb: chipidea: add proper delay for waiting correct PHY status .../ABI/testing/sysfs-platform-chipidea-usb-otg

[PATCH 12/19] usb: chipidea: udc: driver update for OTG HNP

2014-04-23 Thread Peter Chen
From: Li Jun b47...@freescale.com Add b_hnp_enable request handling and enable gadget-is_otg Signed-off-by: Peter Chen peter.c...@freescale.com Acked-by: Peter Chen peter.c...@freescale.com Signed-off-by: Li Jun b47...@freescale.com --- drivers/usb/chipidea/udc.c | 11 ++- 1 files

[PATCH 17/19] usb: chipidea: debug: add debug file for OTG variables

2014-04-23 Thread Peter Chen
From: Li Jun b47...@freescale.com This patch adds a debug file for OTG vairables show. Signed-off-by: Peter Chen peter.c...@freescale.com Signed-off-by: Li Jun b47...@freescale.com --- drivers/usb/chipidea/debug.c | 84 ++ 1 files changed, 84 insertions

[PATCH 18/19] Documentation: ABI: usb: sysfs Description for chipidea USB OTG HNP and SRP

2014-04-23 Thread Peter Chen
From: Li Jun b47...@freescale.com This patch adds sysfs interface description for chipidea USB OTG HNP and SRP. Signed-off-by: Peter Chen peter.c...@freescale.com Signed-off-by: Li Jun b47...@freescale.com --- .../ABI/testing/sysfs-platform-chipidea-usb-otg| 56 1

[PATCH 13/19] usb: chipidea: add OTG fsm operation functions implementation

2014-04-23 Thread Peter Chen
From: Li Jun b47...@freescale.com Add OTG HNP and SRP operation functions implementation: - charge vbus - drive vbus - connection signaling - drive sof - start data pulse - add fsm timer - delete fsm timer - start host - start gadget Signed-off-by: Peter Chen peter.c...@freescale.com Signed-off

[PATCH 14/19] usb: chipidea: OTG fsm timers initialization

2014-04-23 Thread Peter Chen
From: Li Jun b47...@freescale.com This patch adds OTG fsm timers initialization, which use controller's 1ms interrupt as timeout counter, also adds some local timers which are not in otg_fsm_timer list. Signed-off-by: Peter Chen peter.c...@freescale.com Signed-off-by: Li Jun b47...@freescale.com

[PATCH 09/19] usb: chipidea: usb OTG fsm initialization.

2014-04-23 Thread Peter Chen
From: Li Jun b47...@freescale.com This patch adds OTG fsm related initialization when do otg init, add a seperate file for OTG fsm related utilities. Signed-off-by: Peter Chen peter.c...@freescale.com Signed-off-by: Li Jun b47...@freescale.com --- drivers/usb/chipidea/Makefile |1

[PATCH 11/19] usb: chipidea: host: init otg port number

2014-04-23 Thread Peter Chen
From: Li Jun b47...@freescale.com Init otg_port number of otg capable host to be 1 at host start. Signed-off-by: Peter Chen peter.c...@freescale.com Signed-off-by: Li Jun b47...@freescale.com --- drivers/usb/chipidea/host.c | 11 +-- 1 files changed, 9 insertions(+), 2 deletions

[PATCH 16/19] usb: chipidea: add sys inputs for OTG fsm input

2014-04-23 Thread Peter Chen
From: Li Jun b47...@freescale.com This patch adds sys input to control and show OTG fsm inputs by application, user can do host and preipheral role switch by change these inputs. Signed-off-by: Peter Chen peter.c...@freescale.com Signed-off-by: Li Jun b47...@freescale.com --- drivers/usb

[PATCH 02/19] usb: chipidea: coordinate usb phy initialization for different phy type

2014-04-23 Thread Peter Chen
. Cc: Sascha Hauer s.ha...@pengutronix.de Cc: Chris Ruehl chris.ru...@gtsys.com.hk Cc: shc_w...@mail.ru Cc: de...@eukrea.com Cc: feste...@gmail.com Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/core.c | 37 ++--- 1 files changed, 34

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