Re: [PATCH v11 3/9] usb: chipidea: add otg id switch and vbus connect/disconnect detect

2013-03-06 Thread Peter Chen
led for > otg capable devices, so it should be safe. And while at it, I think > this whole otg.c/otg.h part of this patch should be moved to patch 2. > OK. > > > > +static int udc_id_switch_for_device(struct ci13xxx *ci) > > I would use _to_ instead of _for_, for clarity. >

Re: v3.9-rc1: swapper/0 [ INFO: possible circular locking dependency detected ]

2013-03-07 Thread Peter Chen
On Wed, Mar 06, 2013 at 11:33:02AM +0100, Maxime Ripard wrote: > Hi, > > Just noticed this in 3.9-rc1 on an iMX28 (ARM) board with a config > based on mxs_defconfig. I'm using the patchset "Add tested id switch > and vbus connect detect support for Chipidea" from Pe

Re: [PATCH v2 2/5] usb: chipidea: udc: configure iso endpoints

2013-03-07 Thread Peter Chen
.K. | | > Industrial Linux Solutions | http://www.pengutronix.de/ | > Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0| > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-2069

Re: [PATCH 4/5] usb: chipidea: udc: manage dynamic amount of tds with an linked list

2013-03-07 Thread Peter Chen
On Thu, Mar 07, 2013 at 09:16:12AM +0100, Michael Grzeschik wrote: > On Tue, Mar 05, 2013 at 04:40:12PM +0800, Peter Chen wrote: > > On Fri, Mar 01, 2013 at 03:42:26PM +0100, Michael Grzeschik wrote: > > > Instead of having a limited number of usable tds in the udc we use a &g

Re: [PATCH 4/5] usb: chipidea: udc: manage dynamic amount of tds with an linked list

2013-03-07 Thread Peter Chen
at ep_queue? For ep_alloc, we just allocate ep request. -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 5/5] usb: chipidea: udc: add multiple td support to hardware_{en,de}queue

2013-03-07 Thread Peter Chen
will fix that to: > > mReq->req.actual = mReq->req.status ? 0 : actual; Yes, correct > > -- > Pengutronix e.K. | | > Industrial Linux Solutions | http://www.pengutronix.de/ | > Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-

Re: fsl_udc_core: set address request aren't handled like expected. usb30cv test suite fails.

2013-03-07 Thread Peter Chen
req->req.complete = NULL; > req->dtd_count = 0; > > + udelay(2000); > req->req.dma = dma_map_single(ep->udc->gadget.dev.parent, > req->req.buf, req->req.length, > ep_is_in(ep) ? DMA_TO_DEVICE : DMA_FROM_DEVICE

Re: [PATCH v11 4/9] usb: chipidea: udc: add pullup/pulldown dp at hw_device_state

2013-03-07 Thread Peter Chen
On Thu, Mar 07, 2013 at 11:50:54AM +0200, Felipe Balbi wrote: > Hi, > > On Thu, Mar 07, 2013 at 10:36:13AM +0800, Peter Chen wrote: > > > > diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c > > > > index e82dae4..70f9f2d 100644 > &g

Re: [PATCH v11 6/9] usb: chipidea: add vbus regulator control

2013-03-07 Thread Peter Chen
On Thu, Mar 07, 2013 at 11:52:48AM +0200, Felipe Balbi wrote: > On Thu, Mar 07, 2013 at 10:41:03AM +0800, Peter Chen wrote: > > On Wed, Mar 06, 2013 at 01:29:16PM +0200, Felipe Balbi wrote: > > > Hi, > > > > > > On Wed, Mar 06, 2013 at 05:56:37PM +0800, Peter

Re: [PATCH 5/5] usb: chipidea: udc: add multiple td support to hardware_{en,de}queue

2013-03-07 Thread Peter Chen
/ | > Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0| > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | > -- > To unsubscribe from this list: send the line "unsubscribe linux-usb" in > the body of a message to majord

Re: [PATCH v11 4/9] usb: chipidea: udc: add pullup/pulldown dp at hw_device_state

2013-03-08 Thread Peter Chen
h a flag) just you did for uvc? > > UDC core doesn't know VBUS, so the pullup can't be managed by udc core > > totally. > > then teach UDC core about VBUS. Send the patches and we will figure out > if they can be applied or not. I will do it > > -- > b

Re: [PATCH v11 6/9] usb: chipidea: add vbus regulator control

2013-03-08 Thread Peter Chen
t want to limit this patchset to id/vbus enable feature, I admit I am less upstream experience, but if new requirements new features and new bugs always coming, things can't be ended up easily. -- 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 v11 6/9] usb: chipidea: add vbus regulator control

2013-03-08 Thread Peter Chen
ta to DT for chipidea core 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: fsl_udc_core: set address request aren't handled like expected. usb30cv test suite fails.

2013-03-08 Thread Peter Chen
--git a/drivers/usb/gadget/fsl_usb2_udc.h b/drivers/usb/gadget/fsl_usb2_udc.h index c6703bb..bf515d1 100644 --- a/drivers/usb/gadget/fsl_usb2_udc.h +++ b/drivers/usb/gadget/fsl_usb2_udc.h @@ -183,6 +183,7 @@ struct usb_sys_interface { /* Device Address bit masks */ #define USB_DEVICE

About USBADRA bit at DEVICEADDR for chipidea driver

2013-03-08 Thread Peter Chen
e this bit, or the host may send GET_DESCRIPTOR before the controller set address. My question is how can we know if the chipidea controller supports USBADRA feature or not? Thanks. -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in t

Re: fsl_udc_core: set address request aren't handled like expected. usb30cv test suite fails.

2013-03-08 Thread Peter Chen
On Fri, Mar 08, 2013 at 11:54:41AM +0200, Felipe Balbi wrote: > On Fri, Mar 08, 2013 at 05:38:53PM +0800, Peter Chen wrote: > > On Thu, Mar 07, 2013 at 09:58:52AM +0100, Peter Bestler wrote: > > > Hi, > > > > > > We try to get our device (based on p2020rdb)

Re: About USBADRA bit at DEVICEADDR for chipidea driver

2013-03-08 Thread Peter Chen
On Fri, Mar 08, 2013 at 12:39:04PM +0200, Alexander Shishkin wrote: > Peter Chen writes: > > > Hi David > > Hi, > > > I notice at your code for hw_usb_set_address, there is a comment for it > > /** > > * This function explicitly sets the addre

Re: [PATCH 2/3] usb: phy: introduce ->set_vbus() method

2013-03-08 Thread Peter Chen
struct usb_phy *usb_get_phy(enum usb_phy_type type); > -- > 1.8.1.rc1.5.g7e0651a > > -- > To unsubscribe from this list: send the line "unsubscribe linux-usb" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v11 3/9] usb: chipidea: add otg id switch and vbus connect/disconnect detect

2013-03-08 Thread Peter Chen
On Thu, Mar 07, 2013 at 01:50:24PM +0800, Peter Chen wrote: > On Wed, Mar 06, 2013 at 07:09:34PM +0200, Alexander Shishkin wrote: > > > - start/stop API are used at otg id switch and probe routine > > > > > > - Defer some gadget operations at ci's delayed work

Re: About USBADRA bit at DEVICEADDR for chipidea driver

2013-03-10 Thread Peter Chen
On Fri, Mar 08, 2013 at 04:06:30PM +0200, Alexander Shishkin wrote: > Peter Chen writes: > > > On Fri, Mar 08, 2013 at 12:39:04PM +0200, Alexander Shishkin wrote: > >> Peter Chen writes: > >> > >> > Hi David > >> > >> Hi, > >

Re: [PATCH 2/3] usb: phy: introduce ->set_vbus() method

2013-03-10 Thread Peter Chen
On Fri, Mar 08, 2013 at 05:56:11PM +0200, Felipe Balbi wrote: > Hi, > > On Fri, Mar 08, 2013 at 08:37:00PM +0800, Peter Chen wrote: > > On Fri, Mar 08, 2013 at 01:30:52PM +0200, Felipe Balbi wrote: > > > this method will be used to enable or disable > > > the char

Re: fsl_udc_core: set address request aren't handled like expected. usb30cv test suite fails.

2013-03-11 Thread Peter Chen
status stage > completes. But isn't the setAddress request specified that we should > set it after the status stage completes, like it was before > (http://www.beyondlogic.org/usbnutshell/usb6.shtml) We set address at the ep0_req_complete, it is called after the status stage is comp

Re: About USBADRA bit at DEVICEADDR for chipidea driver

2013-03-11 Thread Peter Chen
, it is USB3 CV suite's problem, When it detects 2.0 device, it should follow 2.0 recovery time. -- 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

[RFC PATCH 2/3] usb: udc: delete the vbus indicator at individual driver

2013-03-12 Thread Peter Chen
Let the common struct usb_gadget own it. CC: Alexander Shishkin CC: Jean-Christophe PLAGNIOL-VILLARD CC: Li Yang CC: Roland Stigge CC: Yu Xu CC: Chao Xie CC: Eric Miao CC: Ben Dooks Signed-off-by: Peter Chen --- drivers/usb/chipidea/ci.h |2 -- drivers/usb/chipidea/udc.c

[RFC PATCH 3/3] usb: udc-core: add judgement logic for usb_gadget_connect

2013-03-12 Thread Peter Chen
- If there is no vbus control to indicate connection and disconnect, we can pullup dp when we load gadget module. - If we have vbus control logic, the dp is better pulled up when there is a vbus session. Signed-off-by: Peter Chen --- drivers/usb/gadget/udc-core.c | 24

[RFC PATCH 1/3] usb: udc-core: introduce vbus_active for struct usb_gadget

2013-03-12 Thread Peter Chen
If there is an vbus session event for udc driver, let the udc core know vbus's status. Signed-off-by: Peter Chen --- include/linux/usb/gadget.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index 2e297e8..7e

Re: [RFC PATCH 2/3] usb: udc: delete the vbus indicator at individual driver

2013-03-12 Thread Peter Chen
It is RFC patch, it may occur some build errors, I will send formal patch after building all drivers successful. On Tue, Mar 12, 2013 at 05:03:18PM +0800, Peter Chen wrote: > Let the common struct usb_gadget own it. > > CC: Alexander Shishkin > CC: Jean-Christophe PLAGNIOL-VILLA

Re: [RFC PATCH 2/3] usb: udc: delete the vbus indicator at individual driver

2013-03-12 Thread Peter Chen
On Tue, Mar 12, 2013 at 11:46:49AM +0200, Felipe Balbi wrote: > On Tue, Mar 12, 2013 at 05:03:18PM +0800, Peter Chen wrote: > > Let the common struct usb_gadget own it. > > > > CC: Alexander Shishkin > > CC: Jean-Christophe PLAGNIOL-VILLARD > > CC: Li Yang >

Re: [RFC PATCH 2/3] usb: udc: delete the vbus indicator at individual driver

2013-03-13 Thread Peter Chen
On Wed, Mar 13, 2013 at 09:44:09AM +0200, Felipe Balbi wrote: > On Wed, Mar 13, 2013 at 11:10:43AM +0800, Peter Chen wrote: > > On Tue, Mar 12, 2013 at 11:46:49AM +0200, Felipe Balbi wrote: > > > On Tue, Mar 12, 2013 at 05:03:18PM +0800, Peter Chen wrote: > > > > Le

Re: [PATCH 3/9] USB: add devicetree helpers for determining dr_mode and phy_type

2013-03-13 Thread Peter Chen
e/git/linus/linux-2.6/include/linux/usb/of.h: In function ‘of_usb_get_dr_mode’: /home/b29397/work/code/git/linus/linux-2.6/include/linux/usb/of.h:23: error: ‘USB_DR_MODE_UNKNOWN’ undeclared (first use in this function) /home/b29397/work/code/git/linus/linux-2.6/include/linu

[PATCH 1/1] usb: xhci: fix build warning

2013-03-13 Thread Peter Chen
/home/b29397/work/code/git/linus/linux-2.6/drivers/usb/host/xhci-ring.c: In function ‘handle_port_status’: /home/b29397/work/code/git/linus/linux-2.6/drivers/usb/host/xhci-ring.c:1580: warning: ‘hcd’ may be used uninitialized in this function Signed-off-by: Peter Chen --- drivers/usb/host

[PATCH 00/14] Add vbus status to udc-core

2013-03-13 Thread Peter Chen
: Alexander Shishkin CC: Jean-Christophe PLAGNIOL-VILLARD CC: Li Yang CC: Roland Stigge CC: Yu Xu CC: Chao Xie CC: Eric Miao CC: Ben Dooks CC: Felipe Balbi Peter Chen (14): usb: udc-core: introduce vbus_active for struct usb_gadget usb: chipidea: using common vbus_active usb: at91_udc: using

[PATCH 02/14] usb: chipidea: using common vbus_active

2013-03-13 Thread Peter Chen
Using common vbus_active to indicate vbus status CC: Alexander Shishkin Signed-off-by: Peter Chen --- drivers/usb/chipidea/ci.h |2 -- drivers/usb/chipidea/udc.c |6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/usb/chipidea/ci.h b/drivers/usb/chipidea

[PATCH 03/14] usb: at91_udc: using common vbus_active

2013-03-13 Thread Peter Chen
Using common vbus_active to indicate vbus status CC: Felipe Balbi Signed-off-by: Peter Chen --- drivers/usb/gadget/at91_udc.c | 16 drivers/usb/gadget/at91_udc.h |1 - 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/usb/gadget/at91_udc.c b/drivers

[PATCH 04/14] usb: fsl_udc_core: using common vbus_active

2013-03-13 Thread Peter Chen
Using common vbus_active to indicate vbus status CC: Li Yang Signed-off-by: Peter Chen --- drivers/usb/gadget/fsl_udc_core.c |4 ++-- drivers/usb/gadget/fsl_usb2_udc.h |1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb

[PATCH 06/14] usb: mv_u3d_core: using common vbus_active

2013-03-13 Thread Peter Chen
Using common vbus_active to indicate vbus status CC: Yu Xu Signed-off-by: Peter Chen --- drivers/usb/gadget/mv_u3d.h |1 - drivers/usb/gadget/mv_u3d_core.c | 14 +++--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/usb/gadget/mv_u3d.h b/drivers/usb

[PATCH 05/14] usb: lpc32xx_udc: using common vbus_active

2013-03-13 Thread Peter Chen
Using common vbus_active to indicate vbus status CC: Felipe Balbi Signed-off-by: Peter Chen --- drivers/usb/gadget/lpc32xx_udc.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/usb/gadget/lpc32xx_udc.c b/drivers/usb/gadget/lpc32xx_udc.c index aa04089..13270a9

[PATCH 07/14] usb: mv_udc: using common vbus_active

2013-03-13 Thread Peter Chen
Using common vbus_active to indicate vbus status CC: Chao Xie Signed-off-by: Peter Chen --- drivers/usb/gadget/mv_udc.h |1 - drivers/usb/gadget/mv_udc_core.c | 14 +++--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/usb/gadget/mv_udc.h b/drivers

[PATCH 08/14] usb: omap_udc: using common vbus_active

2013-03-13 Thread Peter Chen
Using common vbus_active to indicate vbus status CC: Felipe Balbi Signed-off-by: Peter Chen --- drivers/usb/gadget/omap_udc.c |4 ++-- drivers/usb/gadget/omap_udc.h |1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget

[PATCH 09/14] usb: pch_udc: using common vbus_active

2013-03-13 Thread Peter Chen
Using common vbus_active to indicate vbus status CC: Felipe Balbi Signed-off-by: Peter Chen --- drivers/usb/gadget/pch_udc.c | 10 -- 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/usb/gadget/pch_udc.c b/drivers/usb/gadget/pch_udc.c index a787a8e..f49d0d2

[PATCH 10/14] usb: pxa25x_udc: using common vbus_active

2013-03-13 Thread Peter Chen
Using common vbus_active to indicate vbus status CC: Eric Miao Signed-off-by: Peter Chen --- drivers/usb/gadget/pxa25x_udc.c |6 +++--- drivers/usb/gadget/pxa25x_udc.h |1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb

[PATCH 01/14] usb: udc-core: introduce vbus_active for struct usb_gadget

2013-03-13 Thread Peter Chen
If there is an vbus session event for udc driver, let the udc core know vbus's status. Signed-off-by: Peter Chen --- include/linux/usb/gadget.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index 2e297e8..7e

[PATCH 11/14] usb: pxa27x_udc: using common vbus_active

2013-03-13 Thread Peter Chen
Using common vbus_active to indicate vbus status CC: Eric Miao Signed-off-by: Peter Chen --- drivers/usb/gadget/pxa27x_udc.c |8 drivers/usb/gadget/pxa27x_udc.h |1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb

[PATCH 12/14] usb: s3c2410_udc: using common vbus_active

2013-03-13 Thread Peter Chen
Using common vbus_active to indicate vbus status CC: Ben Dooks Signed-off-by: Peter Chen --- drivers/usb/gadget/s3c2410_udc.c |6 +++--- drivers/usb/gadget/s3c2410_udc.h |1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb

[PATCH 13/14] usb: udc-core: small cleanup for udc->gadget

2013-03-13 Thread Peter Chen
:s/udc->gadget/gadget Signed-off-by: Peter Chen --- drivers/usb/gadget/udc-core.c | 18 ++ 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/usb/gadget/udc-core.c b/drivers/usb/gadget/udc-core.c index 2a9cd36..4d90bdf 100644 --- a/drivers/usb/gadget/

[PATCH 14/14] usb: udc-core: add judgement logic for usb_gadget_connect

2013-03-13 Thread Peter Chen
- If there is no vbus control to indicate connection. and disconnect, we can pullup dp when we load gadget module. - If we have vbus control logic, the dp is better pull up when there is a vbus session. Signed-off-by: Peter Chen --- drivers/usb/gadget/udc-core.c | 10 -- 1 files

Two remain problems at chipidea driver

2013-03-14 Thread Peter Chen
ut for chipidea core, chipidea core doesn't need to know its clock from IC point. Like clock, the wakeup setting, low power sequence are platform specific, they are designed by individual companies. Let me know your opinion about these two problems and your plan for them. Thanks. -- Best Reg

Re: Two remain problems at chipidea driver

2013-03-14 Thread Peter Chen
On Thu, Mar 14, 2013 at 09:53:55AM +0100, Marc Kleine-Budde wrote: > On 03/14/2013 09:34 AM, Peter Chen wrote: > > Hi Alex and all, > > > > Currently, we have two problems to block chipidea driver coming > > development. > > > > As there are so many chip

Re: [PATCH 14/14] usb: udc-core: add judgement logic for usb_gadget_connect

2013-03-14 Thread Peter Chen
On Thu, Mar 14, 2013 at 11:00:05AM +0200, Felipe Balbi wrote: > Hi, > > On Thu, Mar 14, 2013 at 01:50:42PM +0800, Peter Chen wrote: > > - If there is no vbus control to indicate connection. > > and disconnect, we can pullup dp when we load gadget module. > > - If we h

Re: [PATCH 2/3] usb: phy: introduce ->set_vbus() method

2013-03-14 Thread Peter Chen
On Fri, Mar 08, 2013 at 05:56:11PM +0200, Felipe Balbi wrote: > Hi, > > On Fri, Mar 08, 2013 at 08:37:00PM +0800, Peter Chen wrote: > > On Fri, Mar 08, 2013 at 01:30:52PM +0200, Felipe Balbi wrote: > > > this method will be used to enable or disable > > > the char

Re: [PATCH 1/1] usb: xhci: fix build warning

2013-03-14 Thread Peter Chen
On Thu, Mar 14, 2013 at 10:59:45AM -0400, Alan Stern wrote: > On Thu, 14 Mar 2013, Peter Chen wrote: > > > /home/b29397/work/code/git/linus/linux-2.6/drivers/usb/host/xhci-ring.c: In > > function ‘handle_port_status’: > > /home/b29397/work/code/git/linus/linux-2.6/driv

Re: [PATCH 14/14] usb: udc-core: add judgement logic for usb_gadget_connect

2013-03-14 Thread Peter Chen
On Thu, Mar 14, 2013 at 12:19:04PM +0200, Felipe Balbi wrote: > Hi, > > On Thu, Mar 14, 2013 at 05:24:39PM +0800, Peter Chen wrote: > > > > @@ -278,7 +278,10 @@ static int udc_bind_to_driver(struct usb_udc *udc, > > > > struct usb_gadget_driver *dri > > &g

Re: [PATCH 2/3] usb: phy: introduce ->set_vbus() method

2013-03-14 Thread Peter Chen
On Thu, Mar 14, 2013 at 12:12:47PM +0200, Felipe Balbi wrote: > Hi, > > On Thu, Mar 14, 2013 at 05:38:03PM +0800, Peter Chen wrote: > > > > > @@ -160,6 +163,24 @@ usb_phy_shutdown(struct usb_phy *x) > > > > > x->shutdown(x); > > &

Re: Two remain problems at chipidea driver

2013-03-14 Thread Peter Chen
On Thu, Mar 14, 2013 at 12:31:38PM +0200, Alexander Shishkin wrote: > Peter Chen writes: > > > Hi Alex and all, > > > > Currently, we have two problems to block chipidea driver coming > > development. > > > > As there are so many chipidea versions,

Re: [PATCH 2/3] usb: phy: introduce ->set_vbus() method

2013-03-15 Thread Peter Chen
On Fri, Mar 15, 2013 at 09:53:27AM +0200, Felipe Balbi wrote: > On Fri, Mar 15, 2013 at 02:15:16PM +0800, Peter Chen wrote: > > On Thu, Mar 14, 2013 at 12:12:47PM +0200, Felipe Balbi wrote: > > > Hi, > > > > > > On Thu, Mar 14, 2013 at 05:38:03PM +0800, Peter

Re: [PATCH 2/3] usb: phy: introduce ->set_vbus() method

2013-03-15 Thread Peter Chen
HY to tell the USB controller about VBUS levels, so the PHY manages > VBUS. After talking with IC guys, I agree with you. > > -- > balbi -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to maj

Re: [PATCH 14/14] usb: udc-core: add judgement logic for usb_gadget_connect

2013-03-15 Thread Peter Chen
, it makes sure it, maybe we can move it to usb_gaget_connect /usb_gadget_disconnect or its abstract layer. > > > > I am not familiar with SRP, but I think vbus is pre-condition. > > hehe, google SRP. > > Nah, I'll save you the trouble. SRP is a mechanism for the USB >

Re: Two remain problems at chipidea driver

2013-03-15 Thread Peter Chen
e controller supports OTG operation Eg, for tablet or phone, the dr_mode may be "gadget", but the otg_capable = 1. > > > > Do you agree you convert DT right now, seems Felipe insists on it? > > You mean, move phy to the core instead of passing the pointer and such? > Yes

Re: [PATCH 14/14] usb: udc-core: add judgement logic for usb_gadget_connect

2013-03-15 Thread Peter Chen
orted udc driver, manage pullup at vbus interrupt 3. For gadget module, like uvc, it will call pullup_dp through its app. Are there any cases? We need to design one solution to cover all cases, then, we can try to delete the duplicate pullup calling at all udc drivers, and make it be generic. -- B

Re: [PATCH 1/1] usb: xhci: fix build warning

2013-03-17 Thread Peter Chen
On Fri, Mar 15, 2013 at 10:47:50AM -0400, Alan Stern wrote: > On Fri, 15 Mar 2013, Peter Chen wrote: > > > On Thu, Mar 14, 2013 at 10:59:45AM -0400, Alan Stern wrote: > > > On Thu, 14 Mar 2013, Peter Chen wrote: > > > > > > > /home/b29397/work/code

Re: [PATCH 1/1] usb: xhci: fix build warning

2013-03-17 Thread Peter Chen
On Fri, Mar 15, 2013 at 10:18:57AM -0700, Sarah Sharp wrote: > On Fri, Mar 15, 2013 at 10:47:50AM -0400, Alan Stern wrote: > > On Fri, 15 Mar 2013, Peter Chen wrote: > > > > > On Thu, Mar 14, 2013 at 10:59:45AM -0400, Alan Stern wrote: > > > > O

Re: Two remain problems at chipidea driver

2013-03-17 Thread Peter Chen
at boot, no switch is possible at runtime. Thanks for your information, I understand it now. > > Best regards, > Svetoslav. > > > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-usb" in > the body of a message to majord...@vger.kernel.org

Re: Two remain problems at chipidea driver

2013-03-17 Thread Peter Chen
king mode to be decided by DT without re-compile the kernel by build out the host/gadget 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: Two remain problems at chipidea driver

2013-03-17 Thread Peter Chen
On Fri, Mar 15, 2013 at 01:42:36PM +0100, Matthieu CASTET wrote: > Peter Chen a écrit : > > On Fri, Mar 15, 2013 at 12:38:07PM +0200, Alexander Shishkin wrote: > >>>> Do you see any problems with this? > >>> How to know vbus status if dr_mode == gadget, w

Re: [PATCH 14/14] usb: udc-core: add judgement logic for usb_gadget_connect

2013-03-17 Thread Peter Chen
On Fri, Mar 15, 2013 at 12:37:01PM +0200, Felipe Balbi wrote: > Hi, > > On Fri, Mar 15, 2013 at 06:04:08PM +0800, Peter Chen wrote: > > On Fri, Mar 15, 2013 at 09:51:29AM +0200, Felipe Balbi wrote: > > > > > > that's all wrong and needs to be fixed. UDC-core

Re: [PATCH 2/3] usb: phy: introduce ->set_vbus() method

2013-03-18 Thread Peter Chen
On Fri, Mar 08, 2013 at 05:56:11PM +0200, Felipe Balbi wrote: > Hi, > > On Fri, Mar 08, 2013 at 08:37:00PM +0800, Peter Chen wrote: > > On Fri, Mar 08, 2013 at 01:30:52PM +0200, Felipe Balbi wrote: > > > this method will be used to enable or disable > > > the char

Re: [PATCH 3/5] usb: chipidea: udc: add the define TD_COUNT and fix all users

2013-03-18 Thread Peter Chen
ll resend that series with some additional fixes. > > Regards, > Michael > > -- > Pengutronix e.K. | | > Industrial Linux Solutions | http://www.pengutronix.de/ | > Peiner Str. 6-8, 31137 Hildeshei

Re: [PATCH 1/1] usb: xhci: fix build warning

2013-03-18 Thread Peter Chen
* into the index into the ports on the correct split roothub, and the * correct bus_state structure. */ - /* Find the right roothub. */ - hcd = xhci_to_hcd(xhci); - if ((major_revision == 0x03) != (hcd->speed == HCD_USB3)) - hcd = xhci->shared_hcd;

Re: [PATCH 3/5] usb: chipidea: udc: add the define TD_COUNT and fix all users

2013-03-19 Thread Peter Chen
On Tue, Mar 19, 2013 at 01:02:59PM +0100, Michael Grzeschik wrote: > On Tue, Mar 19, 2013 at 09:34:54AM +0800, Peter Chen wrote: > > On Mon, Mar 18, 2013 at 03:28:26PM +0100, Michael Grzeschik wrote: > > > On Fri, Mar 08, 2013 at 05:54:37PM +0200, Alexander Shishkin wrot

[PATCH v2 1/1] usb: xhci: fix build warning

2013-03-19 Thread Peter Chen
/home/b29397/work/code/git/linus/linux-2.6/drivers/usb/host/xhci-ring.c: In function ‘handle_port_status’: /home/b29397/work/code/git/linus/linux-2.6/drivers/usb/host/xhci-ring.c:1580: warning: ‘hcd’ may be used uninitialized in this function Signed-off-by: Peter Chen --- Changes for v1: - Put

Re: Two remain problems at chipidea driver

2013-03-20 Thread Peter Chen
On Wed, Mar 20, 2013 at 11:11:09AM +0200, Alexander Shishkin wrote: > Peter Chen writes: > > > On Thu, Mar 14, 2013 at 09:53:55AM +0100, Marc Kleine-Budde wrote: > >> On 03/14/2013 09:34 AM, Peter Chen wrote: > >> > Hi Alex and all, > >> > &g

Re: [PATCH 3/5] usb: chipidea: udc: add the define TD_COUNT and fix all users

2013-03-20 Thread Peter Chen
On Wed, Mar 20, 2013 at 10:30:47AM +0100, Michael Grzeschik wrote: > On Wed, Mar 20, 2013 at 09:17:06AM +0800, Peter Chen wrote: > > On Tue, Mar 19, 2013 at 01:02:59PM +0100, Michael Grzeschik wrote: > > > On Tue, Mar 19, 2013 at 09:34:54AM +0800, Peter Chen wrote: > > >

Re: Two remain problems at chipidea driver

2013-03-20 Thread Peter Chen
On Wed, Mar 20, 2013 at 01:04:33PM +0200, Alexander Shishkin wrote: > Peter Chen writes: > > > On Fri, Mar 15, 2013 at 05:17:08PM +0200, Alexander Shishkin wrote: > >> > >> > Eg, for tablet or phone, the dr_mode may be "gadget", but the > >&g

Re: g_serial and cdc_acm communications

2012-07-12 Thread Peter Chen
> Hi, > > Resolved this by fixing a bug in device side transmit routine. Anyways thank > you > guys. This was the only post I found on net with exactly my problem. > Do you mean BUGs at fsl_udc_core.c? Do you mind share of your finding? Thanks, Peter > Regards, > Dipen Patel > > -- > To unsubscr

Re: g_serial and cdc_acm communications

2012-07-13 Thread Peter Chen
> > However I have another problem. My host application calls > SET_CONFIGURATION everytime it starts. On device side my application > is running and waiting for data from Host. But whenever set config > is called serial gadget driver (from composite.c) does soft reset and > I think new port number

Re: [RFC PATCH] USB: enable "power/wakeup" to control remote wakeup in the runtime suspend

2012-07-19 Thread Peter Chen
> Oh. I recheck find these device will use ordinary resume rather than > reset_resume(). > I remeber you said userspace should set USB_QUIRK_RESET_MORPHS for those > kind devices. After reset, they will morph. So reset_resume doesn't > work for them. > Ordinary resume almost just calls usb_get_stat

Re: otg: sharing resources between host and gadget

2012-07-23 Thread Peter Chen
On Mon, Jul 23, 2012 at 5:51 PM, Valentin Sitdikov wrote: > Hello All, > > Could somebody recommend me what is the standard way to share > resources between host and gadget? > > I have seen at least two implementation: > 1. Using suspend/resume: OTG driver resumes or suspends host and > device acc

Re: usb device getting disconnected

2012-08-07 Thread Peter Chen
980516] ehci_hcd :00:1d.0: detected XactErr len 0/4096 retry > 27^M > > > Regards, > Shaiju. > > > -Original Message- > From: Alan Stern [mailto:st...@rowland.harvard.edu] > Sent: Sunday, July 29, 2012 2:54 PM > To: shaiju shaiju > Cc: 'Sadasivan Shaiju'; &#x

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

2012-08-13 Thread Peter Chen
7;s as host controller is the parent of root hub. Signed-off-by: Peter Chen --- 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 +++

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 wrote: > >> >> that sounds like a plan :-) Tomorrow I can send a series of patches >> starting off the split, then people can just send in more

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 wrote: > On Thu, Aug 16, 2012 at 11:51 AM, Felipe Balbi wrote: >> After introducing the new ->reset method on >> struct usb_gadget_driver, UDC drivers are >> required to implement proper handling for it. >> >> This patch adds proper ->reset handling for

Re: [PATCH] usb: otg: Move phy interface to separate file.

2012-08-28 Thread Peter Chen
> > #include > +#include > one small thing: is only needed at phy.h. > /* OTG defines lots of enumeration states before device reset */ > enum usb_otg_state { > @@ -35,31 +36,6 @@ enum usb_otg_state { > OTG_STATE_A_VBUS_ERR, > }; > > -enum usb_phy_events { > - USB_EVENT_NONE,

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

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 (buffering...

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

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 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 >>

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 s

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

2012-09-10 Thread Peter Chen
>> - How to compensate the data which is out-of sync quicker than feedback way? > > It is not really possible to "compensate"; dropped data is gone forever. > Essentially, the stream is restarted with known timing. > So, if big delay occurs (like 10ms), you would like the controller layer tells yo

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

2012-09-13 Thread Peter Chen
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 usb: chipidea: add phy notify at suspend/resume procedure usb: refine

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

2012-09-13 Thread Peter Chen
the port. Signed-off-by: Peter Chen --- 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 +++

[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 --- drivers/usb/otg/mxs-phy.c | 56 +++- 1 files changed, 44 insertions(+), 12 deletions

[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 --- drivers/usb/chipidea/host.c | 75 +- 1 files ch

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

2012-09-13 Thread Peter Chen
notify after the second bus reset. 2. Set disconnect notify after disconnection. Signed-off-by: Peter Chen --- drivers/usb/core/hub.c | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 6dc41c6..2523fc0 100644

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

2012-09-16 Thread Peter Chen
Hi Felipe, Below are two patches to split some phy related things from otg. 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 |3 - drivers/usb/otg/isp1301_omap.c |4 +- drivers/usb/otg/otg.c

[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 --- drivers/usb/otg/isp1301_omap.c |4 ++-- drivers/usb/otg/otg.c | 12 +++- drivers/usb/otg/otg_fsm.c |6 +++--- include/linux/usb/msm_hsusb.h |2

[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 --- drivers/usb/otg/Makefile |3 - drivers/usb/otg/otg.c| 239 -- drivers/usb/phy/Makefile |

[PATCH v2 1/1] usb: chipidea: Improve kconfig

2013-06-04 Thread Peter Chen
h roles as modules (USB_CHIPIDEA=m), since chipidea driver is unify core driver, the host or udc is not a individual driver. Signed-off-by: Peter Chen --- Changes for v2: - Fix the conflict with commit 7c8bfed7aaeba690de30835fe89882e1047a55fd drivers/usb/chipidea/Kconfig |6 +++--- 1 fi

Re: Two remain problems at chipidea driver

2013-06-16 Thread Peter Chen
On Thu, Mar 21, 2013 at 11:06 AM, Peter Chen wrote: > On Wed, Mar 20, 2013 at 01:04:33PM +0200, Alexander Shishkin wrote: >> Peter Chen writes: >> >> > On Fri, Mar 15, 2013 at 05:17:08PM +0200, Alexander Shishkin wrote: >> >> >> >> > Eg, for ta

Re: linux-next: Tree for Jun 18 usb/chipidea)

2013-06-18 Thread Peter Chen
d of USB_PHY support...? > > hmm, looks like a missing stub to me. Alex ? > > -- > balbi Seems i386 chooses CONFIG_OF, but not CONFIG_USB_PHY. I will send a patch to fix it. -- 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

[PATCH 1/1] usb: fix build error without CONFIG_USB_PHY

2013-06-18 Thread Peter Chen
on i386: drivers/built-in.o: In function `ci_hdrc_probe': core.c:(.text+0x20446b): undefined reference to `of_usb_get_phy_mode' Signed-off-by: Peter Chen --- include/linux/usb/of.h | 14 +- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/include/linux/

<    7   8   9   10   11   12   13   14   15   16   >