[PATCHv0 0/5] usb: chipidea: clean up debuggery

2012-11-21 Thread Alexander Shishkin
, now is the good time. Alexander Shishkin (5): usb: chipidea: convert events to tracepoints usb: chipidea: replace interrupt accounting with tracepoints usb: chipidea: convert debug entries in sysfs to debugfs usb: chipidea: move role to debugfs usb: chipidea: move debug files creation/re

[PATCHv0 1/5] usb: chipidea: convert events to tracepoints

2012-11-21 Thread Alexander Shishkin
acing functionality with kernel tracepoints, thus getting rid of the ring buffer and all the maintenance code, while making use of standard kernel infrastructure. Signed-off-by: Alexander Shishkin --- drivers/usb/chipidea/ci.h | 13 +++ drivers/usb/chipidea/core.c |2 + drivers/usb/chi

[PATCHv0 2/5] usb: chipidea: replace interrupt accounting with tracepoints

2012-11-21 Thread Alexander Shishkin
The driver also has interrupt counters and another ring buffer for keeping track of the order in which they arrive. This patch converts these counters to trace points. Userspace tools such as perf can provide information on both order and stats of the interrupts. Signed-off-by: Alexander Shishkin

[PATCHv0 4/5] usb: chipidea: move role to debugfs

2012-11-21 Thread Alexander Shishkin
Manual role switching function is there for debugging purposes, so has to move to debugfs. Signed-off-by: Alexander Shishkin --- drivers/usb/chipidea/core.c | 39 -- drivers/usb/chipidea/debug.c | 54 ++ 2 files changed

[PATCHv0 5/5] usb: chipidea: move debug files creation/removal to the core

2012-11-21 Thread Alexander Shishkin
Create and remove debugfs entries in hdrc probe/remove instead of start/stop of the device controller. Gadget specific will not export anything while the controller is in host mode. Signed-off-by: Alexander Shishkin --- drivers/usb/chipidea/core.c |6 +- drivers/usb/chipidea/udc.c

[PATCHv0 3/5] usb: chipidea: convert debug entries in sysfs to debugfs

2012-11-21 Thread Alexander Shishkin
#x27;s hardly a good idea to touch the registers from userspace anyway. Signed-off-by: Alexander Shishkin --- drivers/usb/chipidea/ci.h|2 + drivers/usb/chipidea/debug.c | 463 +- drivers/usb/chipidea/debug.h |9 +- drivers/usb/chipidea/udc.c

Re: [PATCH v3 0/7] support other fsl SoCs with usbmisc + small fixes

2012-11-22 Thread Alexander Shishkin
Michael Grzeschik writes: > Nearly every SoC from Freescale has this non-core usb registers. This series > adds support for more users of this driver. > > This series is based on Peter Chen's work. Its needed to merge his master > branch > before applying this series: > > https://github.com/hzpe

Re: [BUGFIX PATCH] USB: chipidea: fix use after free bug

2012-11-22 Thread Alexander Shishkin
ar Waßmann Good one, thanks. Acked-by: Alexander Shishkin Greg, this is -stable material, applicable starting from v3.6. > --- > drivers/usb/chipidea/core.c |3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/drivers/usb/chipidea/core.c b/drivers

Re: [PATCH v3 3/7] usb: chipidea: usbmisc: fix a potential race condition

2012-11-23 Thread Alexander Shishkin
Sascha Hauer writes: > On Fri, Nov 23, 2012 at 01:36:36PM +0800, Peter Chen wrote: >> On Wed, Nov 21, 2012 at 03:06:29PM +0100, Michael Grzeschik wrote: >> > From: Marc Kleine-Budde >> > >> > This fixes a potential race condition where the ci13xxx_imx glue code >> > could be fast enough to call

Re: [PATCH 4/9] usb: chipidea: ci13xxx-imx: add "dr_mode" property to device tree bindings

2012-11-29 Thread Alexander Shishkin
Peter Chen writes: > On Fri, Nov 16, 2012 at 01:53:09PM +0200, Alexander Shishkin wrote: >> Michael Grzeschik writes: >> I'd prefer this function to live in ci13xxx_imx, since that's where it's >> used and it doesn't really need anything from core.c a

Re: [PATCH v3 2/7] usb: chipidea: add otg file

2012-11-29 Thread Alexander Shishkin
Peter Chen writes: > diff --git a/drivers/usb/chipidea/ci.h b/drivers/usb/chipidea/ci.h > index d738603..8702871 100644 > --- a/drivers/usb/chipidea/ci.h > +++ b/drivers/usb/chipidea/ci.h > @@ -129,6 +129,7 @@ struct hw_bank { > * @vbus_active: is VBUS active > * @transceiver: pointer to USB

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

2012-11-29 Thread Alexander Shishkin
Peter Chen writes: > +static void ci_otg_work(struct work_struct *work) > +{ > + struct ci13xxx *ci = container_of(work, struct ci13xxx, work); > + > + if (test_bit(CI_ID, &ci->events)) { > + clear_bit(CI_ID, &ci->events); > + ci_handle_id_switch(ci); > + } els

Re: Need review for chipidea driver

2013-01-24 Thread Alexander Shishkin
On 24 January 2013 05:15, Chen Peter-B29397 wrote: > Sorry, forget to cc the list > >> >> Hi Greg, >> >> Alex has no response for chipidea driver review for long time >> (more than 1 month), below are some links about patchset. >> Does anyone else can help do it? Sorry for that. Looking into it a

Re: [PATCH v4 0/6] support other fsl SoCs with usbmisc + small fixes

2013-01-24 Thread Alexander Shishkin
Peter Chen writes: > On Tue, Nov 27, 2012 at 05:16:55PM +0100, Michael Grzeschik wrote: >> Nearly every SoC from Freescale has this non-core usb registers. This series >> adds support for more users of this driver. >> >> This series is based on Peter Chen's work. Its needed to merge his master

[PATCHv1 0/9] usb: chipidea: clean up debuggery

2013-01-24 Thread Alexander Shishkin
, now is the good time. Alexander Shishkin (8): usb: chipidea: drop redundant includes usb: chipidea: trim include list in udc code usb: chipidea: trim include list in the core usb: chipidea: convert events to tracepoints usb: chipidea: replace interrupt accounting with tracepoints

[PATCH 1/9] usb: chipidea: drop redundant includes

2013-01-24 Thread Alexander Shishkin
debug.c is carrying a lot of includes that aren't needed there, drop them. Signed-off-by: Alexander Shishkin --- drivers/usb/chipidea/debug.c | 17 +++-- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/drivers/usb/chipidea/debug.c b/drivers/usb/chipidea/de

[PATCH 2/9] usb: chipidea: trim include list in udc code

2013-01-24 Thread Alexander Shishkin
Some headers included in udc core code are not actually needed, remove them. Signed-off-by: Alexander Shishkin --- drivers/usb/chipidea/udc.c |8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 2f45bba

[PATCH 4/9] usb: chipidea: convert events to tracepoints

2013-01-24 Thread Alexander Shishkin
acing functionality with kernel tracepoints, thus getting rid of the ring buffer and all the maintenance code, while making use of standard kernel infrastructure. Signed-off-by: Alexander Shishkin --- drivers/usb/chipidea/ci.h | 13 +++ drivers/usb/chipidea/core.c |2 + drivers/usb/chi

[PATCH 3/9] usb: chipidea: trim include list in the core

2013-01-24 Thread Alexander Shishkin
Some headers included in the chipidea controller core are not needed, remove them. Signed-off-by: Alexander Shishkin --- drivers/usb/chipidea/core.c |3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index 57cae1f..77963b6 100644

[PATCH 5/9] usb: chipidea: replace interrupt accounting with tracepoints

2013-01-24 Thread Alexander Shishkin
The driver also has interrupt counters and another ring buffer for keeping track of the order in which they arrive. This patch converts these counters to trace points. Userspace tools such as perf can provide information on both order and stats of the interrupts. Signed-off-by: Alexander Shishkin

[PATCH 7/9] usb: chipidea: move role to debugfs

2013-01-24 Thread Alexander Shishkin
Manual role switching function is there for debugging purposes, so has to move to debugfs. Signed-off-by: Alexander Shishkin --- drivers/usb/chipidea/core.c | 39 -- drivers/usb/chipidea/debug.c | 54 ++ 2 files changed

[PATCH 8/9] usb: chipidea: move debug files creation/removal to the core

2013-01-24 Thread Alexander Shishkin
Create and remove debugfs entries in hdrc probe/remove instead of start/stop of the device controller. Gadget specific will not export anything while the controller is in host mode. Signed-off-by: Alexander Shishkin --- drivers/usb/chipidea/core.c |6 +- drivers/usb/chipidea/udc.c

[PATCH 6/9] usb: chipidea: convert debug entries in sysfs to debugfs

2013-01-24 Thread Alexander Shishkin
#x27;s hardly a good idea to touch the registers from userspace anyway. Signed-off-by: Alexander Shishkin --- drivers/usb/chipidea/ci.h|2 + drivers/usb/chipidea/debug.c | 469 +- drivers/usb/chipidea/debug.h |9 +- drivers/usb/chipidea/udc.c

[PATCH 9/9] usb: chipidea: fix precedence bug in ci_requests_show()

2013-01-24 Thread Alexander Shishkin
changes] Signed-off-by: Alexander Shishkin --- drivers/usb/chipidea/debug.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/chipidea/debug.c b/drivers/usb/chipidea/debug.c index 5738079..36a7063 100644 --- a/drivers/usb/chipidea/debug.c +++ b/drivers/usb/chi

Re: [patch v2] usb: gadget: precedence bug in show_requests()

2013-01-24 Thread Alexander Shishkin
Dan Carpenter writes: > The intent here was to have parenthesis around the (ci->hw_ep_max / 2) > so that it counts like "0 1 2 0 1 2". In the current code, the mod > operation happens first so it counts like "0 0 1 1 2 2". > > Signed-off-by: Dan Carpenter Thanks, I added this one on top of my

Re: [PATCH 1/9] usb: chipidea: drop redundant includes

2013-01-24 Thread Alexander Shishkin
Sergei Shtylyov writes: >But you also add some #include's, and don't document this in the changelog. Nice catch, thanks! Regards, -- Alex -- 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 htt

Re: [RESEND PATCH v5 3/7] usb: chipidea: add otg id switch and vbus connect/disconnect detect

2013-01-24 Thread Alexander Shishkin
Peter Chen writes: > The main design flow is the same with msm otg driver, that is the id and > vbus interrupt are handled at core driver, others are handled by > individual drivers. > > - At former design, when switch usb role from device->host, it will call > udc_stop, it will remove the gadget

Re: [RESEND PATCH v5 4/7] usb: chipidea: consolidate ci_role_driver's API for both roles

2013-01-24 Thread Alexander Shishkin
Peter Chen writes: > - Create init/destroy API for probe and remove > - start/stop API are only used otg id switch process > - Create the gadget at ci_hdrc_probe if the gadget is supported > at that port, the main purpose for this is to avoid gadget module > load fail at init.rc I don't think it

Re: [RESEND PATCH v5 3/7] usb: chipidea: add otg id switch and vbus connect/disconnect detect

2013-01-24 Thread Alexander Shishkin
Peter Chen writes: > The main design flow is the same with msm otg driver, that is the id and > vbus interrupt are handled at core driver, others are handled by > individual drivers. > > - At former design, when switch usb role from device->host, it will call > udc_stop, it will remove the gadget

Re: [RESEND PATCH v5 3/7] usb: chipidea: add otg id switch and vbus connect/disconnect detect

2013-01-25 Thread Alexander Shishkin
Peter Chen writes: > On Thu, Jan 24, 2013 at 05:25:17PM +0200, Alexander Shishkin wrote: >> Peter Chen writes: >> >> > The main design flow is the same with msm otg driver, that is the id and >> > vbus interrupt are handled at core driver, others are h

Re: [RESEND PATCH v5 4/7] usb: chipidea: consolidate ci_role_driver's API for both roles

2013-01-25 Thread Alexander Shishkin
Peter Chen writes: > On Thu, Jan 24, 2013 at 04:35:30PM +0200, Alexander Shishkin wrote: >> Peter Chen writes: >> >> > - Create init/destroy API for probe and remove >> > - start/stop API are only used otg id switch process >> > - Create the gadget a

Re: [RESEND PATCH v5 4/7] usb: chipidea: consolidate ci_role_driver's API for both roles

2013-01-29 Thread Alexander Shishkin
Peter Chen writes: > On Fri, Jan 25, 2013 at 02:12:20PM +0200, Alexander Shishkin wrote: >> Peter Chen writes: >> >> > On Thu, Jan 24, 2013 at 04:35:30PM +0200, Alexander Shishkin wrote: >> >> Peter Chen writes: >> >> >> >> >

Re: [PATCH,RFC] usb: add devicetree helpers for determining dr_mode and phy_type

2013-01-29 Thread Alexander Shishkin
Sascha Hauer writes: > From: Michael Grzeschik > > This adds two little devicetree helper functions for determining the > dr_mode (host, peripheral, otg) and phy_type (utmi, ulpi,...) from > the devicetree. > > Signed-off-by: Michael Grzeschik > Signed-off-by: Marc Kleine-Budde > --- > > The p

Re: [RESEND PATCH v5 3/7] usb: chipidea: add otg id switch and vbus connect/disconnect detect

2013-01-30 Thread Alexander Shishkin
Peter Chen writes: > On Wed, Jan 30, 2013 at 11:36:42AM +0530, kishon wrote: >> Hi, >> >> >boolglobal_phy; >> >struct usb_phy *transceiver; >> >struct usb_hcd *hcd; >> >- struct usb_otg otg; >> >+ struct usb_otg

Re: [PATCH 4/9] USB: chipidea: add PTW and PTS handling

2013-02-01 Thread Alexander Shishkin
Michael Grzeschik writes: > On Fri, Feb 01, 2013 at 08:52:07AM +0100, Sascha Hauer wrote: >> From: Michael Grzeschik >> >> This patch makes it possible to configure the PTW and PTS bits inside >> the portsc register for host and device mode before the driver starts >> and the phy can be address

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

2013-02-14 Thread Alexander Shishkin
Sascha Hauer writes: > From: Michael Grzeschik > > This adds two little devicetree helper functions for determining the > dr_mode (host, peripheral, otg) and phy_type (utmi, ulpi,...) from > the devicetree. > > Signed-off-by: Michael Grzeschik > Signed-off-by: Marc Kleine-Budde > Signed-off-by

Re: [PATCH 5/5] usb: chipidea: Fix incorrect check of function return value

2013-02-14 Thread Alexander Shishkin
Svetoslav Neykov writes: > Use the correct variable to check for the return value of the last function. This one is fixed already by Julia Lawall: 5c6e9bf0 Regards, -- Alex -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.

Re: [PATCH 4/5] usb: chipidea: AR933x platform support for the chipidea driver

2013-02-14 Thread Alexander Shishkin
Svetoslav Neykov writes: > Support host and device usb modes for the chipidea controller in AR933x. > The controller doesn't support OTG functionality so the platform code > forces one of the modes based on the state of GPIO13 pin at startup. Some comments below. > > Signed-off-by: Svetoslav Ne

Re: [PATCH 3/5] usb: chipidea: Don't access OTG related registers

2013-02-14 Thread Alexander Shishkin
Svetoslav Neykov writes: > According to the datasheet the chipidea controller in AR933x doesn't expose > OTG and TEST registers. > If no OTG support is detected don't call functions which access those > registers. > > Signed-off-by: Svetoslav Neykov > --- > drivers/usb/chipidea/udc.c | 24 +

Re: [PATCH v8 0/8] Add tested id switch and vbus connect detect support for Chipidea

2013-02-14 Thread Alexander Shishkin
Peter Chen writes: > Changes for v7: > - Add ci_supports_gadget helper to know if the controller > supports gadget, if the controller supports gadget, it > needs to read otgsc to know the vbus value, basically, > if the controller supports gadget, it will support host > as well [3/8] > - At ci_hd

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

2013-02-14 Thread Alexander Shishkin
Peter Chen writes: > The main design flow is the same with msm otg driver, that is the id and > vbus interrupt are handled at core driver, others are handled by > individual drivers. > > - At former design, when switch usb role from device->host, it will call > udc_stop, it will remove the gadget

Re: [PATCH 5/9] USB: chipidea: add PTW and PTS handling

2013-02-14 Thread Alexander Shishkin
Sascha Hauer writes: > From: Michael Grzeschik > > This patch makes it possible to configure the PTW and PTS bits inside > the portsc register for host and device mode before the driver starts > and the phy can be addressed as hardware implementation is designed. > > Signed-off-by: Michael Grzes

Re: [PATCH v4] USB: add devicetree helpers for determining dr_mode and phy_type

2013-02-14 Thread Alexander Shishkin
Sascha Hauer writes: > 4th round of patches. > > Peter, I would be glad if you could test them before your holiday. I rebased > your last round of Chipidea OTG patches onto this series which you can pull > here: > > git://git.pengutronix.de/git/imx/linux-2.6.git tags/usb-chipidea-otg-for-next > >

Re: [patch] USB: chipidea: fix & vs | bug

2013-02-15 Thread Alexander Shishkin
Dan Carpenter writes: > On Fri, Feb 15, 2013 at 01:26:29PM +0300, Dan Carpenter wrote: >> On Fri, Sep 14, 2012 at 02:58:20PM +0800, Richard Zhao wrote: >> > On Fri, Sep 14, 2012 at 09:50:56AM +0300, Dan Carpenter wrote: >> > > There is a '&' vs '|' typo in the original code so the condition is >>

Re: [patch] USB: chipidea: fix & vs | bug

2013-02-15 Thread Alexander Shishkin
Dan Carpenter writes: > On Fri, Feb 15, 2013 at 02:54:56PM +0200, Alexander Shishkin wrote: >> Dan Carpenter writes: >> >> > On Fri, Feb 15, 2013 at 01:26:29PM +0300, Dan Carpenter wrote: >> >> On Fri, Sep 14, 2012 at 02:58:20PM +0800, Richard Zhao wrote: &

Re: About chipidea tree

2013-02-26 Thread Alexander Shishkin
Peter Chen writes: > Hi Alex, Hi, > Do we have a chipidea repo which is queued for mainline? > We have several patchsets for chipidea these monthes, I > don't know their status. For me, I would like based > on your tree if it exists. I thought about it, but then it seems like having a separate

Re: About chipidea tree

2013-02-26 Thread Alexander Shishkin
Greg KH writes: > On Thu, Feb 21, 2013 at 05:12:45PM +0800, Peter Chen wrote: >> Hi Alex, >> >> Do we have a chipidea repo which is queued for mainline? >> We have several patchsets for chipidea these monthes, I >> don't know their status. For me, I would like based >> on your tree if it exists.

Re: About chipidea tree

2013-02-26 Thread Alexander Shishkin
Marc Kleine-Budde writes: > On 02/26/2013 11:56 AM, Alexander Shishkin wrote: >> Peter Chen writes: >> >>> Hi Alex, >> >> Hi, >> >>> Do we have a chipidea repo which is queued for mainline? >>> We have several patchsets for chip

Re: [PATCH] usb: chipidea: register debugging sysfs on our device

2013-02-26 Thread Alexander Shishkin
Felipe Balbi writes: > Don't register anything non-generic under > the gadget's device as we don't really *own* > it. > > Signed-off-by: Felipe Balbi > --- > > Hi Alex, > > please take a look at this patch, if you don't reply to it > I will take it through my tree for this -rc cycle. I have sent

Re: [PATCH 0/5] Chipidea driver support for the AR933x platform

2013-02-26 Thread Alexander Shishkin
Svetoslav Neykov writes: > Add support for the usb controller in AR933x platform. > The processor is big-endian so all multi-byte values of the usb > descriptors must be converted explicitly. Another difference is that > the controller supports both host and device modes but not OTG. > The patch

RE: [PATCH 0/5] Chipidea driver support for the AR933x platform

2013-02-26 Thread Alexander Shishkin
Svetoslav Neykov writes: > Hi Alex, > I am working on the incorporating all received comments - thanks to all for > taking their time to comment. > Apologies for not replying to the received mails, didn't want to spam with > OK replies to each separately. Great, thanks! Looks like this patchset

Re: About chipidea tree

2013-02-26 Thread Alexander Shishkin
Greg KH writes: > On Tue, Feb 26, 2013 at 01:01:48PM +0200, Alexander Shishkin wrote: >> Greg KH writes: >> >> > On Thu, Feb 21, 2013 at 05:12:45PM +0800, Peter Chen wrote: >> >> Hi Alex, >> >> >> >> Do we have a chipidea repo which

Re: [PATCH v9 8/9] usb: chipidea: tell platform layer the ci core probe's result

2013-02-28 Thread Alexander Shishkin
Felipe Balbi writes: > Hi, > > On Thu, Feb 28, 2013 at 04:31:44PM +0800, Peter Chen wrote: >> > > > > > > If the probe fails, the ci13xxx_add_device will not return error, >> > > > > > > (bus_probe_device doesn't has return value) >> > > > > > > therefore, the platform layer can't know whether co

Re: [PATCH 3/3] USB mxs-phy: Register phy with framework

2013-02-28 Thread Alexander Shishkin
Marc Kleine-Budde writes: > On 02/28/2013 09:01 AM, Felipe Balbi wrote: >> hi, >> >> On Wed, Feb 27, 2013 at 03:16:30PM +0100, Marc Kleine-Budde wrote: >>> From: Sascha Hauer >>> >>> We now have usb_add_phy_dev(), so use it to register with the framework >>> to be able to find the phy from the

Re: About chipidea tree

2013-02-28 Thread Alexander Shishkin
Peter Chen writes: > On Tue, Feb 26, 2013 at 02:47:34PM +0100, Marc Kleine-Budde wrote: >> On 02/26/2013 02:25 PM, Alexander Shishkin wrote: >> > Marc Kleine-Budde writes: >> > >> >> On 02/26/2013 11:56 AM, Alexander Shishkin wrote: >> &

Re: [PATCH 3/4] USB mxs-phy: use readl(), writel() instead of the _relaxed() versions

2013-02-28 Thread Alexander Shishkin
Marc Kleine-Budde writes: > This patch converts the mxs-phy driver from readl_relaxed(), writel_relaxed() > to the plain readl(), writel() functions, which are available on all > platforms. > This is done to enable compile time testing on non ARM platforms. > > Reported-by:

Re: [PATCH v9 8/9] usb: chipidea: tell platform layer the ci core probe's result

2013-02-28 Thread Alexander Shishkin
Felipe Balbi writes: > Hi, > > On Thu, Feb 28, 2013 at 11:32:09AM +0200, Alexander Shishkin wrote: >> >> > > > > > > If the probe fails, the ci13xxx_add_device will not return >> >> > > > > > > error, >> >> > &g

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

2013-03-06 Thread Alexander Shishkin
On 6 March 2013 12:33, 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 Peter Chen in its > 10th version [1], rebased on top

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

2013-03-06 Thread Alexander Shishkin
On 6 March 2013 11:56, Peter Chen wrote: > The main design flow is the same with msm otg driver, that is the id and > vbus interrupt are handled at core driver, others are handled by > individual drivers. > > - At former design, when switch usb role from device->host, it will call > udc_stop, it w

Re: [PATCH] usb: chipidea: don't redefine __ffs()

2013-03-07 Thread Alexander Shishkin
On 7 March 2013 18:47, Felipe Balbi wrote: > Hi, > > On Fri, Feb 22, 2013 at 10:24:41AM +0200, Felipe Balbi wrote: >> chipidea's ffs_nr() is pretty much what __ffs() does. >> >> Use that one instead. >> >> Signed-off-by: Felipe Balbi > > it has been almost 2 weeks, just a gentle ping here. It's

Re: About USBADRA bit at DEVICEADDR for chipidea driver

2013-03-08 Thread Alexander Shishkin
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 address, without the "USBADRA" (advance) > * feature, which is not supported by older versions of the controller. > */ That's mine. David's

Re: About USBADRA bit at DEVICEADDR for chipidea driver

2013-03-08 Thread Alexander Shishkin
Peter Chen writes: > 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 >> > /** &g

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

2013-03-08 Thread Alexander Shishkin
Peter Chen writes: > On Thu, Mar 07, 2013 at 09:58:52AM +0100, Peter Bestler wrote: >> Hi, >> >> We try to get our device (based on p2020rdb) usb 2.0 compliant. We ran the >> usb30cv test suite (version 1.0.1.2, chapter 9 tests for usb 2.0 devices) on >> win7 with g_zero and g_serial. We acces

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

2013-03-08 Thread Alexander Shishkin
Michael Grzeschik writes: > A static count of transfer descriptors was used everywhere in the driver > with the fixed number 4. This patch adds a define, named TD_COUNT, and > replaces all users of this value. This way its possible to have only one > parameter to change and limit the amount of td

Re: [PATCH 3/5] USB chipidea: introduce dual role mode pdata flags

2013-03-08 Thread Alexander Shishkin
On 8 March 2013 18:33, Felipe Balbi wrote: > Hi, > > On Thu, Feb 28, 2013 at 11:57:02AM +0100, Marc Kleine-Budde wrote: >> @@ -487,14 +488,23 @@ static int ci_hdrc_probe(struct platform_device *pdev) >> return -ENODEV; >> } >> >> + /* For now we treat dual-role as otg */ >>

Re: [PATCH 3/5] USB chipidea: introduce dual role mode pdata flags

2013-03-08 Thread Alexander Shishkin
On 8 March 2013 18:52, Marc Kleine-Budde wrote: > On 03/08/2013 05:46 PM, Alexander Shishkin wrote: >> On 8 March 2013 18:33, Felipe Balbi wrote: >>> Hi, >>> >>> On Thu, Feb 28, 2013 at 11:57:02AM +0100, Marc Kleine-Budde wrote: >>>> @@ -4

Re: About USBADRA bit at DEVICEADDR for chipidea driver

2013-03-11 Thread Alexander Shishkin
Peter Chen writes: > 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

Re: Two remain problems at chipidea driver

2013-03-14 Thread Alexander Shishkin
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, we impossible to collect > all to make a decision, it is better to cover most of the cases, > and using device tree (or platform dat

Re: Two remain problems at chipidea driver

2013-03-15 Thread Alexander Shishkin
Peter Chen writes: > 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. >> > &

Re: Two remain problems at chipidea driver

2013-03-15 Thread Alexander Shishkin
Peter Chen writes: > On Fri, Mar 15, 2013 at 12:38:07PM +0200, Alexander Shishkin wrote: >> >> >> >> I'd say, in the core driver: >> >> 1) get dr_mode from platform data >> >> 2) only if that's DR_MODE_UNKNOWN (iirc), read DC

Re: Two remain problems at chipidea driver

2013-03-20 Thread Alexander Shishkin
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, >> > >> > Currently, we have two problems to block chipidea driver coming >> > development. >> > >> > As there are so many chipidea versions

Re: Two remain problems at chipidea driver

2013-03-20 Thread Alexander Shishkin
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 >> > otg_capable = 1. >> >> No, because dr_mode indicates controller's capab

Re: Two remain problems at chipidea driver

2013-03-20 Thread Alexander Shishkin
Marc Kleine-Budde writes: > On 03/20/2013 12:04 PM, 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 "gadge

Re: Two remain problems at chipidea driver

2013-03-20 Thread Alexander Shishkin
Marc Kleine-Budde writes: > On 03/20/2013 12:23 PM, Alexander Shishkin wrote: >> Marc Kleine-Budde writes: >> >>> On 03/20/2013 12:04 PM, Alexander Shishkin wrote: >>>> Peter Chen writes: >>>> >>>>> On Fri, Mar 15, 2013 at 05:

Re: Two remain problems at chipidea driver

2013-03-20 Thread Alexander Shishkin
Felipe Balbi writes: > Hi, > > On Wed, Mar 20, 2013 at 03:37:01PM +0200, Alexander Shishkin wrote: >> >> dr_cap is what the device can actually do (host, peripheral, etc). Tells >> >> us which roles to initialize and wether we can access OTGSC on this >> &g

Re: chipidea driver

2012-08-24 Thread Alexander Shishkin
Richard Zhao writes: > On Thu, Aug 23, 2012 at 06:57:03PM +0200, Marc Kleine-Budde wrote: >> Hello, Hi, >> Michael and I have a bunch of updates and improvement for the chipidea >> driver. They apply to Richard's tree: >> >> https://github.com/riczhao/kernel-imx/commits/topics/usb-driver >> >

Re: [PATCH v2 04/11] USB: chipidea: clear gadget struct at udc_start fail path

2012-08-28 Thread Alexander Shishkin
Richard Zhao writes: > States in gadget are not needed any more, set it to zero. It's generally a good practice to mention in the commit message what is it that you are fixing with this patch. > Signed-off-by: Richard Zhao > --- > drivers/usb/chipidea/udc.c |1 + > 1 file changed, 1 inser

Re: [PATCH v2 05/11] USB: chipidea: don't let probe fail if otg controller start one role failed

2012-08-28 Thread Alexander Shishkin
Richard Zhao writes: > One role failed, but the other role will possiblly still work. > For example, when udc start failed, if plug in a host device, > it works. If you're a host device, ci->role should be HOST at this point and ci_role_start() shouldn't fail. If ci->role is detected wrongly, th

Re: [PATCH v6 1/3] USB: chipidea: add imx usbmisc support

2012-08-29 Thread Alexander Shishkin
Richard Zhao writes: > i.MX usb controllers shares non-core registers, which may include > SoC specific controls. We take it as a usbmisc device and usbmisc > driver set operations needed by ci13xxx_imx driver. > > For example, Sabrelite board has bad over-current design, we can > usbmisc to disa

Re: [PATCH v2 04/11] USB: chipidea: clear gadget struct at udc_start fail path

2012-08-29 Thread Alexander Shishkin
Richard Zhao writes: > On Tue, Aug 28, 2012 at 11:29:35AM +0300, Alexander Shishkin wrote: >> Richard Zhao writes: >> >> > States in gadget are not needed any more, set it to zero. >> >> It's generally a good practice to mention in the commit messa

Re: [PATCH v2 05/11] USB: chipidea: don't let probe fail if otg controller start one role failed

2012-08-29 Thread Alexander Shishkin
Richard Zhao writes: > On Tue, Aug 28, 2012 at 11:38:23AM +0300, Alexander Shishkin wrote: >> Richard Zhao writes: >> >> > One role failed, but the other role will possiblly still work. >> > For example, when udc start failed, if plug in a host device, >&

Re: [PATCH v2 04/11] USB: chipidea: clear gadget struct at udc_start fail path

2012-08-29 Thread Alexander Shishkin
Richard Zhao writes: > On Wed, Aug 29, 2012 at 11:03:48AM +0300, Alexander Shishkin wrote: >> Richard Zhao writes: >> >> > On Tue, Aug 28, 2012 at 11:29:35AM +0300, Alexander Shishkin wrote: >> >> Richard Zhao writes: >> >> >> >>

Re: [PATCH v2 05/11] USB: chipidea: don't let probe fail if otg controller start one role failed

2012-08-29 Thread Alexander Shishkin
Richard Zhao writes: > On Wed, Aug 29, 2012 at 11:10:33AM +0300, Alexander Shishkin wrote: >> Richard Zhao writes: >> >> > On Tue, Aug 28, 2012 at 11:38:23AM +0300, Alexander Shishkin wrote: >> >> Richard Zhao writes: >> >> >> >>

Re: [PATCH v6 1/3] USB: chipidea: add imx usbmisc support

2012-08-29 Thread Alexander Shishkin
Sascha Hauer writes: > On Wed, Aug 29, 2012 at 10:50:08AM +0300, Alexander Shishkin wrote: >> Richard Zhao writes: >> >> > i.MX usb controllers shares non-core registers, which may include >> > SoC specific controls. We take it as a usbmisc device and usbmisc

Re: [PATCH v3 1/5] usb: chipidea: udc: fix setup of endpoint maxpacket size

2012-09-06 Thread Alexander Shishkin
D_MAX. > > Some gadget drivers check for the maxpacket size before they enable the > endpoint, which leads to a wrong state in these drivers. > > Cc: > Signed-off-by: Michael Grzeschik > Signed-off-by: Marc Kleine-Budde > Acked-by: Felipe Balbi Acked-by: Alexan

Re: [PATCH v3 2/5] usb: chipidea: udc: add pullup fuction, needed by the uvc gadget

2012-09-06 Thread Alexander Shishkin
ine-Budde > Acked-by: Felipe Balbi Acked-by: Alexander Shishkin > --- > drivers/usb/chipidea/udc.c | 21 + > 1 file changed, 17 insertions(+), 4 deletions(-) > > diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c > index 7801a3f..32ee870

Re: [PATCH v3 3/5] usb: chipidea: udc: fix error path in udc_start()

2012-09-06 Thread Alexander Shishkin
Marc Kleine-Budde writes: > This patch fixes the error path of udc_start(). Now NULL is used to > unset the peripheral with otg_set_peripheral(). > > Signed-off-by: Marc Kleine-Budde > Reviewed-by: Richard Zhao Acked-by: Alexander Shishkin > --- > drivers/usb/chipidea

Re: [PATCH v3 4/5] usb: chipidea: cleanup dma_pool if udc_start() fails

2012-09-06 Thread Alexander Shishkin
-off-by: Marc Kleine-Budde Acked-by: Alexander Shishkin > --- > drivers/usb/chipidea/udc.c | 23 +++ > 1 file changed, 15 insertions(+), 8 deletions(-) > > diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c > index 3a755e5..2d8b609 10064

Re: [PATCH v3 5/5] usb: chipidea: udc: don't stall endpoint if request list is empty in isr_tr_complete_low

2012-09-06 Thread Alexander Shishkin
other mainline chipidea drivers (mv_udc_core.c and fsl_udc_core.c) don't > have this check. > > Signed-off-by: Michael Grzeschik > Signed-off-by: Marc Kleine-Budde Makes sense to me, Acked-by: Alexander Shishkin > --- > drivers/usb/chipidea/udc.c |5 + > 1

Re: [PATCH v3 2/5] usb: chipidea: udc: add pullup fuction, needed by the uvc gadget

2012-09-06 Thread Alexander Shishkin
Marc Kleine-Budde writes: > On 09/06/2012 02:26 PM, Alexander Shishkin wrote: >> Marc Kleine-Budde writes: >> >>> From: Michael Grzeschik >>> >>> Add function to physicaly enable or disable of pullup connection on the >>> USB-D+ >>

Re: chipidea driver

2012-09-06 Thread Alexander Shishkin
Greg KH writes: > On Fri, Aug 24, 2012 at 10:09:11AM +0800, Richard Zhao wrote: >> On Thu, Aug 23, 2012 at 06:57:03PM +0200, Marc Kleine-Budde wrote: >> > Hello, >> > >> > Michael and I have a bunch of updates and improvement for the chipidea >> > driver. They apply to Richard's tree: >> > >> >

Re: [PATCH v2 05/11] USB: chipidea: don't let probe fail if otg controller start one role failed

2012-09-11 Thread Alexander Shishkin
Richard Zhao writes: > On Wed, Aug 29, 2012 at 12:48:15PM +0300, Alexander Shishkin wrote: >> Richard Zhao writes: >> >> > On Wed, Aug 29, 2012 at 11:10:33AM +0300, Alexander Shishkin wrote: >> >> Richard Zhao writes: >> >> >> >> &g

Re: [PATCH v6 1/3] USB: chipidea: add imx usbmisc support

2012-09-11 Thread Alexander Shishkin
Richard Zhao writes: > On Wed, Aug 29, 2012 at 10:00:32PM +0200, Marc Kleine-Budde wrote: >> On 08/29/2012 01:01 PM, Sascha Hauer wrote: >> > On Wed, Aug 29, 2012 at 01:18:10PM +0300, Alexander Shishkin wrote: >> >> Sascha Hauer writes: >> >> >&

Re: [PATCH v2 05/11] USB: chipidea: don't let probe fail if otg controller start one role failed

2012-09-12 Thread Alexander Shishkin
Richard Zhao writes: > On Tue, Sep 11, 2012 at 10:23:55AM +0300, Alexander Shishkin wrote: >> Richard Zhao writes: >> >> > On Wed, Aug 29, 2012 at 12:48:15PM +0300, Alexander Shishkin wrote: >> >> Richard Zhao writes: >> >> >> >> &g

[PATCH] usb: move children deallocation after quiescing the hub

2012-09-12 Thread Alexander Shishkin
dren, which are already deallocated. Simple modprobe dummy_hcd && rmmod dummy_hcd will illustrate the problem. This patch moves deallocation of hub's ports after hub_quiesce() call in hub_disconnect(). Cc: Lan Tianyu Signed-off-by: Alexander Shishkin --- drivers/usb/core/hub.c |

[PATCH 00/12] usb: chipidea updates for v3.7

2012-09-12 Thread Alexander Shishkin
Hi, This bunch of patches contains fixes in the core driver and updates for chipidea integrated in imx chips. Marc Kleine-Budde (2): usb: chipidea: udc: fix error path in udc_start() usb: chipidea: cleanup dma_pool if udc_start() fails Michael Grzeschik (3): usb: chipidea: udc: fix setup o

[PATCH 01/12] usb: chipidea: udc: fix setup of endpoint maxpacket size

2012-09-12 Thread Alexander Shishkin
size before they enable the endpoint, which leads to a wrong state in these drivers. Cc: Signed-off-by: Michael Grzeschik Acked-by: Felipe Balbi Signed-off-by: Marc Kleine-Budde Signed-off-by: Alexander Shishkin --- drivers/usb/chipidea/udc.c |8 +++- 1 file changed, 7 insertions(+), 1

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

2012-09-12 Thread Alexander Shishkin
From: Michael Grzeschik 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. Cc: Signed-off-by: Michael Grzeschik Acked-by: Felipe Balbi Signed-off-by: Marc Kleine-Budde Signed-off-by: Alexander

[PATCH 03/12] usb: chipidea: udc: fix error path in udc_start()

2012-09-12 Thread Alexander Shishkin
From: Marc Kleine-Budde This patch fixes the error path of udc_start(). Now NULL is used to unset the peripheral with otg_set_peripheral(). Cc: Reviewed-by: Richard Zhao Signed-off-by: Marc Kleine-Budde Signed-off-by: Alexander Shishkin --- drivers/usb/chipidea/udc.c |2 +- 1 file

[PATCH 05/12] usb: chipidea: udc: don't stall endpoint if request list is empty in isr_tr_complete_low

2012-09-12 Thread Alexander Shishkin
by: Marc Kleine-Budde Signed-off-by: Alexander Shishkin --- drivers/usb/chipidea/udc.c |5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 2d8b609..d214448 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chip

  1   2   3   4   >