[RFC/PATCH 10/32] usb: gadget: fsl_qe_udc: let udc-core manage gadget->dev

2013-01-24 Thread Felipe Balbi
By simply setting a flag, we can drop some boilerplate code. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/fsl_qe_udc.c | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/usb/gadget/fsl_qe_udc.c b/drivers/usb/gadget/fsl_qe_udc.c index ec50f18

[RFC/PATCH 11/32] usb: gadget: fsl_udc_core: let udc-core manage gadget->dev

2013-01-24 Thread Felipe Balbi
By simply setting a flag, we can drop some boilerplate code. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/fsl_udc_core.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c index 49642d4

[RFC/PATCH 07/32] usb: gadget: atmel_usba_udc: let udc-core manage gadget->dev

2013-01-24 Thread Felipe Balbi
By simply setting a flag, we can drop some boilerplate code. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/atmel_usba_udc.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c index

[RFC/PATCH 12/32] usb: gadget: fusb300_udc: let udc-core manage gadget->dev

2013-01-24 Thread Felipe Balbi
By simply setting a flag, we can drop some boilerplate code. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/fusb300_udc.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/usb/gadget/fusb300_udc.c b/drivers/usb/gadget/fusb300_udc.c index 8c2372f

[RFC/PATCH 15/32] usb: gadget: lpc32xx_udc: let udc-core manage gadget->dev

2013-01-24 Thread Felipe Balbi
By simply setting a flag, we can drop some boilerplate code. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/lpc32xx_udc.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/usb/gadget/lpc32xx_udc.c b/drivers/usb/gadget/lpc32xx_udc.c index dd1c9b1

[RFC/PATCH 18/32] usb: gadget: mv_u3d_core: fix a compile warning

2013-01-24 Thread Felipe Balbi
Fix the following compile warning: mv_u3d_core.c:1766:12: warning: 'mv_u3d_remove' \ defined but not used [-Wunused-function] Signed-off-by: Felipe Balbi --- drivers/usb/gadget/mv_u3d_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/

[RFC/PATCH 21/32] usb: gadget: net2280: let udc-core manage gadget->dev

2013-01-24 Thread Felipe Balbi
By simply setting a flag, we can drop some boilerplate code. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/net2280.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c index 708c0b5..630f715 100644 --- a

[RFC/PATCH 20/32] usb: gadget: net2272: let udc-core manage gadget->dev

2013-01-24 Thread Felipe Balbi
By simply setting a flag, we can drop some boilerplate code. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/net2272.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/usb/gadget/net2272.c b/drivers/usb/gadget/net2272.c index d226058..635248f 100644

[RFC/PATCH 22/32] usb: gadget: pch_udc: let udc-core manage gadget->dev

2013-01-24 Thread Felipe Balbi
By simply setting a flag, we can drop some boilerplate code. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/pch_udc.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/usb/gadget/pch_udc.c b/drivers/usb/gadget/pch_udc.c index a787a8e..7032145 100644 --- a

[RFC/PATCH 26/32] usb: gadget: s3c2410_udc: let udc-core manage gadget->dev

2013-01-24 Thread Felipe Balbi
By simply setting a flag, we can drop some boilerplate code. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/s3c2410_udc.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c index fc07b43..302e137

[RFC/PATCH 25/32] usb: gadget: s3c-hsudc: let udc-core manage gadget->dev

2013-01-24 Thread Felipe Balbi
By simply setting a flag, we can drop some boilerplate code. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/s3c-hsudc.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/usb/gadget/s3c-hsudc.c b/drivers/usb/gadget/s3c-hsudc.c index 4a3d620..dee6810

[RFC/PATCH 29/32] usb: gadget: pxa27x_udc: let udc-core manage gadget->dev

2013-01-24 Thread Felipe Balbi
By simply setting a flag, we can drop some boilerplate code. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/pxa27x_udc.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c index f7d2579..23a3eed

[RFC/PATCH 31/32] usb: chipidea: let udc-core manage gadget->dev

2013-01-24 Thread Felipe Balbi
By simply setting a flag, we can drop some boilerplate code. Signed-off-by: Felipe Balbi --- drivers/usb/chipidea/udc.c | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index f64fbea..e95e8bb 100644 --- a

[RFC/PATCH 28/32] usb: gadget: pxa25x_udc: let udc-core manage gadget->dev

2013-01-24 Thread Felipe Balbi
By simply setting a flag, we can drop some boilerplate code. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/pxa25x_udc.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c index fa9c344..9deffd3

[RFC/PATCH 32/32] usb: gadget: drop now unnecessary flag

2013-01-24 Thread Felipe Balbi
We don't need the ->register_my_device flag anymore because all UDC drivers have been properly converted. Let's remove every history of it. Signed-off-by: Felipe Balbi --- drivers/usb/chipidea/udc.c | 1 - drivers/usb/dwc3/gadget.c | 1 - drive

[RFC/PATCH 30/32] usb: chipidea: register debugging syfs on our device

2013-01-24 Thread Felipe Balbi
Don't register anything non-generic under the gadget's device as we don't really *own* it. Signed-off-by: Felipe Balbi --- drivers/usb/chipidea/udc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.

[RFC/PATCH 27/32] usb: renesas_usbhs: gadget: let udc-core manage gadget->dev

2013-01-24 Thread Felipe Balbi
By simply setting a flag, we can drop some boilerplate code. Signed-off-by: Felipe Balbi --- drivers/usb/renesas_usbhs/mod_gadget.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c

[RFC/PATCH 24/32] usb: gadget: s3c-hsotg: let udc-core manage gadget->dev

2013-01-24 Thread Felipe Balbi
By simply setting a flag, we can drop some boilerplate code. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/s3c-hsotg.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index 833d85b..bd8292d

[RFC/PATCH 23/32] usb: gadget: r8a66597-udc: let udc-core manage gadget->dev

2013-01-24 Thread Felipe Balbi
By simply setting a flag, we can drop some boilerplate code. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/r8a66597-udc.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/usb/gadget/r8a66597-udc.c b/drivers/usb/gadget/r8a66597-udc.c index 5a80751

[RFC/PATCH 19/32] usb: gadget: mv_udc_core: let udc-core manage gadget->dev

2013-01-24 Thread Felipe Balbi
By simply setting a flag, we can drop some boilerplate code. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/mv_udc_core.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/usb/gadget/mv_udc_core.c b/drivers/usb/gadget/mv_udc_core.c index 67d72f9

[RFC/PATCH 16/32] usb: gadget: m66592-udc: let udc-core manage gadget->dev

2013-01-24 Thread Felipe Balbi
By simply setting a flag, we can drop some boilerplate code. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/m66592-udc.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/usb/gadget/m66592-udc.c b/drivers/usb/gadget/m66592-udc.c index 0a35db1..c5d1b39

[RFC/PATCH 17/32] usb: gadget: mv_u3d_core: let udc-core manage gadget->dev

2013-01-24 Thread Felipe Balbi
By simply setting a flag, we can drop some boilerplate code. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/mv_u3d_core.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/usb/gadget/mv_u3d_core.c b/drivers/usb/gadget/mv_u3d_core.c index b5cea27..565addc

[RFC/PATCH 13/32] usb: gadget: goku_udc: let udc-core manage gadget->dev

2013-01-24 Thread Felipe Balbi
By simply setting a flag, we can drop some boilerplate code. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/goku_udc.c | 10 +- drivers/usb/gadget/goku_udc.h | 3 +-- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/usb/gadget/goku_udc.c b/drivers/usb/gadget

[RFC/PATCH 14/32] usb: gadget: imx_udc: let udc-core manage gadget->dev

2013-01-24 Thread Felipe Balbi
By simply setting a flag, we can drop some boilerplate code. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/imx_udc.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/usb/gadget/imx_udc.c b/drivers/usb/gadget/imx_udc.c index a0eb857..c8b5da3 100644

[RFC/PATCH 09/32] usb: gadget: dummy_hcd: let udc-core manage gadget->dev

2013-01-24 Thread Felipe Balbi
By simply setting a flag, we can drop some boilerplate code. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/dummy_hcd.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c index 95d584d..8155d4a 100644

Re: [PATCH v2] usb: host: tegra: make use of PHY pointer of HCD

2013-01-24 Thread Felipe Balbi
On Thu, Jan 24, 2013 at 09:28:32PM +0530, BVG Rao wrote: > On Thu, Jan 24, 2013 at 7:35 PM, Felipe Balbi wrote: > > Hi, > > > > On Thu, Jan 24, 2013 at 03:57:03PM +0530, Venu Byravarasu wrote: > >> As pointer to PHY structure can be stored in struct usb_hcd > &

[PATCH] usb: gadget: constify all struct usb_gadget_ops

2013-01-24 Thread Felipe Balbi
Add the missing 'const' keyword to all struct usb_gadget_ops in the gadget framework. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/fsl_qe_udc.c| 2 +- drivers/usb/gadget/fsl_udc_core.c | 2 +- drivers/usb/gadget/fusb300_udc.c | 2 +- drivers/usb/gadget/m6

[PATCH] usb: gadget: remove inode.c

2013-01-24 Thread Felipe Balbi
it's not used anymore by anyone, we can remove it. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/inode.c | 2129 1 file changed, 2129 deletions(-) delete mode 100644 drivers/usb/gadget/inode.c diff --git a/drivers/usb/gadget/inode.c b/dr

Re: [PATCH] usb: gadget: remove inode.c

2013-01-24 Thread Felipe Balbi
Hi, On Thu, Jan 24, 2013 at 06:05:08PM +0200, Felipe Balbi wrote: > it's not used anymore by anyone, we can remove it. > > Signed-off-by: Felipe Balbi my bad, we still have gadgetfs. In any case, everybody agrees about removing gadgetfs and using f_fs only ? -- balbi

Re: [PATCH] usb: gadget: remove inode.c

2013-01-24 Thread Felipe Balbi
On Thu, Jan 24, 2013 at 08:23:33AM -0800, Greg KH wrote: > On Thu, Jan 24, 2013 at 06:06:45PM +0200, Felipe Balbi wrote: > > Hi, > > > > On Thu, Jan 24, 2013 at 06:05:08PM +0200, Felipe Balbi wrote: > > > it's not used anymore by anyone, we can remove it. >

Re: [PATCH] usb: gadget: remove inode.c

2013-01-24 Thread Felipe Balbi
On Thu, Jan 24, 2013 at 08:33:59AM -0800, Greg KH wrote: > On Thu, Jan 24, 2013 at 06:25:56PM +0200, Felipe Balbi wrote: > > On Thu, Jan 24, 2013 at 08:23:33AM -0800, Greg KH wrote: > > > On Thu, Jan 24, 2013 at 06:06:45PM +0200, Felipe Balbi wrote: > > > > Hi, &

Re: [PATCH] usb: gadget: remove inode.c

2013-01-24 Thread Felipe Balbi
Hi, On Thu, Jan 24, 2013 at 11:40:38AM -0500, Alan Stern wrote: > On Thu, 24 Jan 2013, Felipe Balbi wrote: > > > On Thu, Jan 24, 2013 at 08:23:33AM -0800, Greg KH wrote: > > > On Thu, Jan 24, 2013 at 06:06:45PM +0200, Felipe Balbi wrote: > > > > Hi, > > >

Re: [PATCH] usb: gadget: remove inode.c

2013-01-24 Thread Felipe Balbi
Hi, On Thu, Jan 24, 2013 at 11:55:45AM -0500, Alan Stern wrote: > On Thu, 24 Jan 2013, Felipe Balbi wrote: > > > > > > gadgetfs is a userspace api that I don't think we can just drop all > > > > > that > > > > > easily. Does f_fs do eve

Re: [PATCH v2] usb: host: tegra: make use of PHY pointer of HCD

2013-01-24 Thread Felipe Balbi
On Thu, Jan 24, 2013 at 08:57:01AM -0800, Stephen Warren wrote: > On 01/24/2013 06:05 AM, Felipe Balbi wrote: > > Hi, > > > > On Thu, Jan 24, 2013 at 03:57:03PM +0530, Venu Byravarasu wrote: > >> As pointer to PHY structure can be stored in struct usb_hcd > >&

Re: [PATCH] usb: gadget: remove inode.c

2013-01-24 Thread Felipe Balbi
Hi, On Thu, Jan 24, 2013 at 06:28:19PM +0100, Michal Nazarewicz wrote: > On Thu, Jan 24 2013, Greg KH wrote: > > gadgetfs is a userspace api that I don't think we can just drop all > > that easily. Does f_fs do everything that gadgetfs does? > > gadgetfs and functionfs have a different API so f_

[RFC/PATCH v2 0/2] usb: gadget: state tracking

2013-01-24 Thread Felipe Balbi
Hi folks, I know it has been a long time and most of the Cc list probably doesn't even remember this, but hey here it is. V2 of the original state tracking RFC. I think I have sorted out all comments, but please go through it and we'll see. cheers Felipe Balbi (2): usb: gadget:

[RFC/PATCH v2 1/2] usb: gadget: introduce gadget state tracking

2013-01-24 Thread Felipe Balbi
that's useful information to expose to userland. NYET-Signed-off-by: Felipe Balbi --- drivers/usb/gadget/udc-core.c | 52 +++ include/linux/usb/gadget.h| 11 + 2 files changed, 63 insertions(+) diff --git a/drivers/usb/gadget/udc-cor

[RFC/PATCH v2 2/2] usb: dwc3: gadget: implement gadget status tracking

2013-01-24 Thread Felipe Balbi
make use of the previously introduced gadget->status field. NYET-Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/ep0.c| 15 --- drivers/usb/dwc3/gadget.c | 1 + 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep

Re: [RFC/PATCH v2 2/2] usb: dwc3: gadget: implement gadget status tracking

2013-01-24 Thread Felipe Balbi
Hi, On Thu, Jan 24, 2013 at 07:54:37PM +0200, Felipe Balbi wrote: > diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c > index 067ba6ad..db44b9f 100644 > --- a/drivers/usb/dwc3/gadget.c > +++ b/drivers/usb/dwc3/gadget.c > @@ -2107,6 +2107,7

Re: [RFC/PATCH 32/32] usb: gadget: drop now unnecessary flag

2013-01-24 Thread Felipe Balbi
On Thu, Jan 24, 2013 at 07:52:52PM +0100, Tomasz Figa wrote: > Hi Felipe, > > On Thursday 24 of January 2013 17:46:10 Felipe Balbi wrote: > > We don't need the ->register_my_device flag > > anymore because all UDC drivers have been > > properly converted. > &

Re: [PATCH] usb: gadget: remove inode.c

2013-01-24 Thread Felipe Balbi
Hi, On Thu, Jan 24, 2013 at 07:16:39PM +0100, Michal Nazarewicz wrote: > On Thu, Jan 24 2013, Felipe Balbi wrote: > > Hmm, looks like there's no easy way out. Can we (easily) make > > a compatibility layer between the two ? What are the biggest > > differences? > >

Re: [RFC/PATCH v2 1/2] usb: gadget: introduce gadget state tracking

2013-01-24 Thread Felipe Balbi
Hi, On Thu, Jan 24, 2013 at 02:58:19PM -0500, Alan Stern wrote: > On Thu, 24 Jan 2013, Felipe Balbi wrote: > > > that's useful information to expose to userland. > > > > NYET-Signed-off-by: Felipe Balbi > > --- >

[RFC/PATCH v3 0/3] usb: gadget: state tracking

2013-01-24 Thread Felipe Balbi
Hi folks, here's v3 of the RFC. Chances since v2: - split usb_state_string() to a separate patch, placed it on usb-common.c and renamed from usb_device_state_string() - moved NOTATTACHED to udc-core.c::usb_add_gadget_udc(). Felipe Balbi (3): usb: common: intr

[RFC/PATCH v3 1/3] usb: common: introduce usb_state_string()

2013-01-24 Thread Felipe Balbi
this function will receive enum usb_device_state and return a human-readable string from it or, case an unknown value is passed as argument, the string "UNKNOWN". Signed-off-by: Felipe Balbi --- drivers/usb/usb-common.c | 21 + include/linux/usb/ch9.h | 9 ++

[RFC/PATCH v3 2/3] usb: gadget: introduce gadget state tracking

2013-01-24 Thread Felipe Balbi
that's useful information to expose to userland. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/udc-core.c | 25 + include/linux/usb/gadget.h| 11 +++ 2 files changed, 36 insertions(+) diff --git a/drivers/usb/gadget/udc-core.c b/drivers/usb/gadge

[RFC/PATCH v3 3/3] usb: dwc3: gadget: implement gadget status tracking

2013-01-24 Thread Felipe Balbi
make use of the previously introduced gadget->status field. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/ep0.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c index d7da073..ec4b563 100644 --- a/drivers/

Re: [PATCH v2 2/2] usb: dwc3-exynos: Fix compatible strings for the device

2013-01-24 Thread Felipe Balbi
Hi, On Thu, Jan 24, 2013 at 01:32:13PM -0800, Greg KH wrote: > On Thu, Jan 24, 2013 at 07:15:30PM +0530, Vivek Gautam wrote: > > Using specific chip in compatible strings. Newer SOCs can claim > > device by using older string in the compatible list. > > > > Signed-off-by: Vivek Gautam > > Acked-

Re: [PATCH] usb:musb: musbhsdma: change the number of dma channels according to hardware configuration

2013-01-24 Thread Felipe Balbi
On Wed, Jan 23, 2013 at 04:22:58PM +0800, yingchun li wrote: > According to "musbhdrd usb 2.0 high-speed dual-role controller > Product Specification" > the number of dma channels can be read from register RAMINFO. > it is not always that number of dma channels is MUSB_HSDMA_CHANNELS, some > SOC ma

Re: [PATCH v1 1/8] usb: otg: palmas-usb: make palmas-usb as a comparator driver

2013-01-24 Thread Felipe Balbi
Hi, On Fri, Jan 25, 2013 at 08:42:24AM +0530, Kishon Vijay Abraham I wrote: > palmas-usb is made as a comparator driver to omap usb2 phy, so that > omap usb can make use of palmas for srp and also to set vbus. > > Signed-off-by: Kishon Vijay Abraham I doesn't apply. palmas-usb isn't in mainline

Re: [RFC/PATCH v3 1/3] usb: common: introduce usb_state_string()

2013-01-24 Thread Felipe Balbi
On Fri, Jan 25, 2013 at 03:45:37PM +0800, Peter Chen wrote: > On Thu, Jan 24, 2013 at 10:40:36PM +0200, Felipe Balbi wrote: > > this function will receive enum usb_device_state > > and return a human-readable string from it or, > > case an unknown value is passed as arg

Re: [PATCH v3 1/4] drivers: usb: phy: add a new driver for usb part of control module

2013-01-24 Thread Felipe Balbi
On Thu, Jan 24, 2013 at 09:32:46PM -0800, Stephen Warren wrote: > On 01/24/2013 06:19 PM, Kishon Vijay Abraham I wrote: > > Added a new driver for the usb part of control module. This has an API > > to power on the USB2 phy and an API to write to the mailbox depending on > > whether MUSB has to act

Re: [balbi-usb:xceiv 11/13] include/linux/usb/phy.h:194:2: warning: return makes integer from pointer without a cast

2013-01-25 Thread Felipe Balbi
Hi, On Fri, Jan 25, 2013 at 04:15:13PM +0800, kbuild test robot wrote: > tree: git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git xceiv > head: a342da25a9a7f5a2f34030e5017043780a673cd1 > commit: 84c5bc80a75b8db64e890d035ee1469822b85438 [11/13] usb: otg: add an api > to bind the usb c

Re: [PATCH v3 1/4] drivers: usb: phy: add a new driver for usb part of control module

2013-01-25 Thread Felipe Balbi
hi, On Fri, Jan 25, 2013 at 02:12:41PM +0530, kishon wrote: > On Friday 25 January 2013 01:18 PM, Felipe Balbi wrote: > >On Thu, Jan 24, 2013 at 09:32:46PM -0800, Stephen Warren wrote: > >>On 01/24/2013 06:19 PM, Kishon Vijay Abraham I wrote: > >>>Added a new driv

Re: [PATCH v1 1/8] usb: otg: palmas-usb: make palmas-usb as a comparator driver

2013-01-25 Thread Felipe Balbi
On Fri, Jan 25, 2013 at 02:14:07PM +0530, kishon wrote: > On Friday 25 January 2013 01:13 PM, Felipe Balbi wrote: > >Hi, > > > >On Fri, Jan 25, 2013 at 08:42:24AM +0530, Kishon Vijay Abraham I wrote: > >>palmas-usb is made as a comparator driver to omap usb2 phy, so

[PATCH v4 2/3] usb: gadget: introduce gadget state tracking

2013-01-25 Thread Felipe Balbi
that's useful information to expose to userland. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/udc-core.c | 23 +++ include/linux/usb/gadget.h| 9 + 2 files changed, 32 insertions(+) diff --git a/drivers/usb/gadget/udc-core.c b/drivers/usb/gadge

[PATCH v4 1/3] usb: common: introduce usb_state_string()

2013-01-25 Thread Felipe Balbi
this function will receive enum usb_device_state and return a human-readable string from it or, case an unknown value is passed as argument, the string "UNKNOWN". Signed-off-by: Felipe Balbi --- drivers/usb/usb-common.c | 21 + include/linux/usb/ch9.h | 9 ++

[PATCH v4 0/3] usb: gadget: state tracking

2013-01-25 Thread Felipe Balbi
here's v4 Changes since v3: - Remove direct inclusion of Chances since v2: - split usb_state_string() to a separate patch, placed it on usb-common.c and renamed from usb_device_state_string() - moved NOTATTACHED to udc-core.c::usb_add_gadget_udc(). F

[PATCH v4 3/3] usb: dwc3: gadget: implement gadget state tracking

2013-01-25 Thread Felipe Balbi
make use of the previously introduced gadget->state field. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/ep0.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c index d7da073..ec4b563 100644 --- a/drivers/

Re: [PATCH v4 2/3] usb: gadget: introduce gadget state tracking

2013-01-25 Thread Felipe Balbi
Hi, On Fri, Jan 25, 2013 at 11:12:41AM +0200, Felipe Balbi wrote: > that's useful information to expose to userland. > > Signed-off-by: Felipe Balbi > --- > drivers/usb/gadget/udc-core.c | 23 +++ > include/linux/usb/gadget.h| 9 +

Re: [PATCH v4 2/3] usb: gadget: introduce gadget state tracking

2013-01-25 Thread Felipe Balbi
Hi, On Fri, Jan 25, 2013 at 11:29:57AM +0200, Felipe Balbi wrote: > Hi, > > On Fri, Jan 25, 2013 at 11:12:41AM +0200, Felipe Balbi wrote: > > that's useful information to expose to userland. > > > > Signed-off-by: Felipe Balbi > > --- &

Re: [PATCH v4 4/4] drivers: usb: start using the control module driver

2013-01-25 Thread Felipe Balbi
Hi, On Fri, Jan 25, 2013 at 03:54:00PM +0530, Kishon Vijay Abraham I wrote: > Start using the control module driver for powering on the PHY and for > writing to the mailbox instead of writing to the control module > registers on their own. > > Signed-off-by: Kishon Vijay Abraham I > --- > Docum

Re: [PATCH v4 1/4] drivers: usb: phy: add a new driver for usb part of control module

2013-01-25 Thread Felipe Balbi
On Fri, Jan 25, 2013 at 11:01:41AM +, Mark Rutland wrote: > On Fri, Jan 25, 2013 at 10:23:57AM +, Kishon Vijay Abraham I wrote: > > Added a new driver for the usb part of control module. This has an API > > to power on the USB2 phy and an API to write to the mailbox depending on > > whether

Re: [PATCH v4 1/4] drivers: usb: phy: add a new driver for usb part of control module

2013-01-25 Thread Felipe Balbi
Hi, On Fri, Jan 25, 2013 at 12:29:43PM +, Mark Rutland wrote: > > > > + depending upon omap4 or omap5. > > > > + - reg-names: The names of the register addresses corresponding to the > > > > registers > > > > + filled in "reg". > > > > + - ti,type: This is used to differentiate whether th

Re: [PATCH v4 2/3] usb: gadget: introduce gadget state tracking

2013-01-25 Thread Felipe Balbi
Hi, On Fri, Jan 25, 2013 at 10:27:24AM -0500, Alan Stern wrote: > On Fri, 25 Jan 2013, Felipe Balbi wrote: > > > I guess it would be good to have a: > > > > enum usb_gadget_state usb_gadget_get_state(struct usb_gadget *gadget) > > { > > return gadget->

[GIT PULL] usb: musb: patches for v3.9:x

2013-01-25 Thread Felipe Balbi
Hi Greg, here's MUSB's pull request. Let me know if you want any changes. This one merged cleanly on top of your usb-next branch. The following changes since commit 9931faca02c604c22335f5a935a501bb2ace6e20: Linux 3.8-rc3 (2013-01-09 18:59:55 -0800) are available in the git repository at: g

[GIT PULL] usb: dwc3: patches for v3.9

2013-01-25 Thread Felipe Balbi
: converting debugfs regdump utility to regsets, better "compatible" strings for Exynos platforms and the removal of the dependency for Host and Gadget; now dwc3 can be compiled host-only, device-only, and/or Dual-Role. -------- Fel

[GIT PULL] usb: gadget: patches for v3.9

2013-01-25 Thread Felipe Balbi
usb: otg: mv_otg: use devm_xxx for probe usb: host: ehci-mv: remove unused variable usb: gadget: mv_udc: fix the value of tranceiver Felipe Balbi (14): usb: gadget: f_uac2: fix compile warning usb: gadget: fix two sparse warnings usb: gadget: amd5536udc: convert

[GIT PULL] usb: phy: patches for v3.9

2013-01-25 Thread Felipe Balbi
Hi Greg, Here are some transceiver changes for v3.9 merge window. This tag merged clean, but there were some automatic merge resolutions by git. The following changes since commit d1c3ed669a2d452cacfb48c2d171a1f364dae2ed: Linux 3.8-rc2 (2013-01-02 18:13:21 -0800) are available in the git repo

Re: [PATCH v4 1/4] drivers: usb: phy: add a new driver for usb part of control module

2013-01-25 Thread Felipe Balbi
Hi, On Fri, Jan 25, 2013 at 04:14:02PM +, Mark Rutland wrote: > On Fri, Jan 25, 2013 at 02:59:28PM +0000, Felipe Balbi wrote: > > Hi, > > > > On Fri, Jan 25, 2013 at 12:29:43PM +, Mark Rutland wrote: > > > > > > + depending upon omap4 or omap5.

Re: [PATCH v4 2/3] usb: gadget: introduce gadget state tracking

2013-01-25 Thread Felipe Balbi
On Fri, Jan 25, 2013 at 08:07:31AM -0800, Greg KH wrote: > On Fri, Jan 25, 2013 at 05:31:35PM +0200, Felipe Balbi wrote: > > Hi, > > > > On Fri, Jan 25, 2013 at 10:27:24AM -0500, Alan Stern wrote: > > > On Fri, 25 Jan 2013, Felipe Balbi wrote: > > > >

Re: [GIT PULL] usb: phy: patches for v3.9

2013-01-25 Thread Felipe Balbi
On Fri, Jan 25, 2013 at 09:13:36AM -0800, Greg KH wrote: > On Fri, Jan 25, 2013 at 06:18:54PM +0200, Felipe Balbi wrote: > > Hi Greg, > > > > Here are some transceiver changes for v3.9 merge window. This tag merged > > clean, but there were some automatic merge resol

v3.8-rc4: Page Allocation Failure

2013-01-25 Thread Felipe Balbi
Hi folks, This now started to happen on my development PC. I'm running v3.8-rc4 with my gadget-specific patches (nothing on the Host side, no gadget code is running here). Below you will find dmesg of the failure which just triggered. Looks like it's related to the async function call problem whi

Re: [PATCH] usb: gadget: f_fs: fix wrong parenthesis in ffs_func_req_match()

2016-11-18 Thread Felipe Balbi
Hi, Felix Hädicke writes: > Hello, >> Properly check the return code of ffs_func_revmap_intf() and >> ffs_func_revmap_ep() for a non-negative value. >> >> Instead of checking the return code, the comparison was performed for the >> last >> parameter of the function calls, because of wrong paren

[GIT PULL] USB fixes for v4.9-rc6

2016-11-18 Thread Felipe Balbi
Hi Greg, here's one important fix for v4.9-final on functionFS. It's small and simple and all it does is make sure we check for ffs_func_req_match()'s return code properly. let me know if you want me to change this pull request in any way. cheers The following changes since commit a25f0944ba9b

[GIT PULL] USB patches for v4.10 merge window

2016-11-18 Thread Felipe Balbi
usb: gadget: f_fs: use complete() instead complete_all() Fabian Frederick (1): usb: isp1301-omap: don't opencode IS_REACHABLE() Felipe Balbi (74): usb: add helper to extract bits 12:11 of wMaxPacketSize usb: gadget: composite: correctly initialize ep->maxpacket usb:

Re: [PATCH v2 1/3] usb: xhci: add quirk flag for broken PED bits

2016-11-21 Thread Felipe Balbi
Hi, Roger Quadros writes: > diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h > index f945380..6553903 100644 > --- a/drivers/usb/host/xhci.h > +++ b/drivers/usb/host/xhci.h > @@ -1656,6 +1656,9 @@ struct xhci_hcd { > #define XHCI_SSIC_PORT_UNUSED(1 << 22) > #define XHCI_N

Re: [PATCH 0/5] usb: dwc2: fix parameter handling

2016-11-22 Thread Felipe Balbi
Hi, John Youn writes: > On 11/20/2016 1:26 PM, Stefan Wahren wrote: >> This patch series fixes several parameter handling issues >> found on bcm2835 in gadget mode. It's based on Felipe's USB next. >> >> Stefan Wahren (5): >> usb: dwc2: Do not set host parameter in peripheral mode >> usb: d

Re: [PATCH 5/5] usb: dwc2: fix kernel-doc for dwc2_set_param

2016-11-22 Thread Felipe Balbi
Hi, Stefan Wahren writes: > Since there is no parameter @value replace it with @legacy. > > Fixes: 05ee799f202 ("usb: dwc2: Move gadget settings into core_params") > Signed-off-by: Stefan Wahren > --- > drivers/usb/dwc2/params.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > di

Re: [PATCH 5/5] usb: dwc2: fix kernel-doc for dwc2_set_param

2016-11-22 Thread Felipe Balbi
Hi, Stefan Wahren writes: > Hi Felipe, > > Am 22.11.2016 um 13:23 schrieb Felipe Balbi: >> Hi, >> >> Stefan Wahren writes: >>> Since there is no parameter @value replace it with @legacy. >>> >>> Fixes: 05ee799f202 ("usb: dwc2: Move g

Re: [PATCH] fsl/usb: Add FSL USB Gadget entry in platform device id table

2016-11-23 Thread Felipe Balbi
Hi, Changming Huang writes: > Add FSL USB Gadget entry in platform device id table > > Signed-off-by: Changming Huang > Signed-off-by: Suresh Gupta > --- > drivers/usb/gadget/udc/fsl_udc_core.c |2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/usb/gadget/udc/fsl_udc_core.c

Re: [RFT PATCH 1/1] xhci: free xhci virtual devices with leaf nodes first

2016-11-24 Thread Felipe Balbi
Hi, Mathias Nyman writes: > the tt_info provided by a HS hub might be in use to by a child device > Make sure we free the devices in the correct order. > > This is needed in special cases such as when xhci controller is > reset when resuming from hibernate, and all virt_devices are freed. > > Al

Re: [RFT PATCH 1/1] xhci: free xhci virtual devices with leaf nodes first

2016-11-24 Thread Felipe Balbi
Hi, Mathias Nyman writes: >>> + /* are any devices using this tt_info? */ >>> + for (i = 1; i < HCS_MAX_SLOTS(xhci->hcs_params1); i++) { >> >> off-by-one here ? Why is i starting from 1? >> >>> + vdev = xhci->devs[i]; > > slit_id 0 is

[PATCH 0/2] usb: host: xhci: two small fixes

2016-11-24 Thread Felipe Balbi
stage. Note how I have also converted on_data_stage and all the pointer mathing to more robust TRB type matching. Tested (albeit lightly with USB storage and keyboard + rootfs on another USB storage) with a SKL box. Patches on top of today's next/master Felipe Balbi (2): usb: host: xhci: d

[PATCH 1/2] usb: host: xhci: dynamically allocate devs array

2016-11-24 Thread Felipe Balbi
Instead of always defaulting to a 256-entry array, we can dynamically allocate devs based on what HW tells us it supports. Note that we can't, yet, purge MAX_HC_SLOTS completely because of struct xhci_device_context_array reliance on it. Signed-off-by: Felipe Balbi --- drivers/usb/host

[PATCH 2/2] usb: host: xhci: handle COMP_STOP from SETUP phase too

2016-11-24 Thread Felipe Balbi
re to use TRB_TYPE field of the actual TRB instead of matching pointers to figure out in which stage of the control transfer we got our completion event. Signed-off-by: Felipe Balbi --- drivers/usb/host/xhci-ring.c | 30 ++ 1 file changed, 18 insertions(+), 12 deletion

Re: [PATCH 1/2] usb: host: xhci: dynamically allocate devs array

2016-11-28 Thread Felipe Balbi
Hi, Mathias Nyman writes: > On 24.11.2016 15:33, Felipe Balbi wrote: >> Instead of always defaulting to a 256-entry array, >> we can dynamically allocate devs based on what HW >> tells us it supports. >> >> Note that we can't, yet, purge MAX_HC

[PATCH v2 3/4] usb: host: xhci: change pre-increments to post-increments

2016-11-28 Thread Felipe Balbi
This is a cleanup patch only, no functional changes. The idea is just to make sure for loops look the same all over the driver. Signed-off-by: Felipe Balbi --- drivers/usb/host/xhci-dbg.c | 20 ++-- drivers/usb/host/xhci-mem.c | 10 +- drivers/usb/host/xhci.c | 14

[PATCH v2 2/4] usb: host: xhci: handle COMP_STOP from SETUP phase too

2016-11-28 Thread Felipe Balbi
re to use TRB_TYPE field of the actual TRB instead of matching pointers to figure out in which stage of the control transfer we got our completion event. Signed-off-by: Felipe Balbi --- drivers/usb/host/xhci-ring.c | 30 ++ 1 file changed, 18 insertions(+), 12 deletion

[PATCH v2 4/4] usb: host: xhci: print HCIVERSION on debug

2016-11-28 Thread Felipe Balbi
When calling xhci_dbg_regs() we actually _do_ want to know XHCI's version. This might help figure out why certain problems only happen in some cases. Signed-off-by: Felipe Balbi --- drivers/usb/host/xhci-dbg.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/host/xhci-db

[PATCH v2 0/4] usb: host: xhci: cleanups and couple fixes

2016-11-28 Thread Felipe Balbi
debugging. Tested (albeit lightly with USB storage and keyboard + rootfs on another USB storage) with a SKL box. Patches on top of today's next/master Felipe Balbi (4): usb: host: xhci: dynamically allocate devs array usb: host: xhci: handle COMP_STOP from SETUP phase too usb: host: x

[PATCH v2 1/4] usb: host: xhci: dynamically allocate devs array

2016-11-28 Thread Felipe Balbi
Instead of always defaulting to a 256-entry array, we can dynamically allocate devs based on what HW tells us it supports. Note that we can't, yet, purge MAX_HC_SLOTS completely because of struct xhci_device_context_array reliance on it. Signed-off-by: Felipe Balbi --- drivers/usb/host

[RFC/PATCH 2/2] usb: host: xhci: WARN on unexpected COMP_SUCCESS

2016-11-28 Thread Felipe Balbi
COMP_SUCCESS should only be asserted on a *true* sucessful transfer. Any other cases are bogus and we should aim to catch them. One easy way to get bug reports is to trigger a WARN_ONCE() on such cases. Signed-off-by: Felipe Balbi --- drivers/usb/host/xhci-ring.c | 28

[RFC/PATCH 1/2] usb: host: xhci: rename completion codes to match spec

2016-11-28 Thread Felipe Balbi
Cleanup only. This patch is a mechaninal rename to make sure our macros for TRB completion codes match what the specification uses to refer to such errors. The idea behind this is that it makes it far easier to grep the specification and match it with implementation. Signed-off-by: Felipe Balbi

[RFC/PATCH 0/2] usb: host: xhci: couple more cleanups

2016-11-28 Thread Felipe Balbi
Hi Mathias, these two cleanups are proposals for now, hence RFC on subject. Let me know what you think of the idea. Felipe Balbi (2): usb: host: xhci: rename completion codes to match spec usb: host: xhci: WARN on unexpected COMP_SUCCESS drivers/usb/host/xhci-hub.c | 3 +- drivers/usb

XHCI's lock usage on hardirq handler

2016-11-29 Thread Felipe Balbi
Hi folks, I've been staring at this part of the code for a while. To make things easier here's the part of XHCI I mean: > irqreturn_t xhci_irq(struct usb_hcd *hcd) > { > struct xhci_hcd *xhci = hcd_to_xhci(hcd); > union xhci_trb *event_ring_deq; > irqreturn_t ret = IRQ_NONE; >

Re: [PATCH 1/2] usb: dwc3: gadget: Fix full speed mode

2016-11-29 Thread Felipe Balbi
Hi, Roger Quadros writes: > DCFG.DEVSPD == 0x3 is not valid and we need to set > DCFG.DEVSPD to 0x1 for full speed mode. seems like it has been made invalid somewhere between 1.73a and 2.60a. Can you figure it out from Documentation why and when it was made invalid? We might need revision check

[PATCH 1/5] usb: host: xhci: WARN() if we interrupt without event_ring

2016-11-29 Thread Felipe Balbi
7;re happy that this doesn't happen, we should just remove this altogether. Signed-off-by: Felipe Balbi --- drivers/usb/host/xhci-ring.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 4dd2e438467f..

[PATCH 4/5] usb: host: xhci: remove unneded semicolon

2016-11-29 Thread Felipe Balbi
it does no good, let's remove it. Signed-off-by: Felipe Balbi --- drivers/usb/host/xhci-ext-caps.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-ext-caps.h b/drivers/usb/host/xhci-ext-caps.h index e0244fb3903d..28deea584884 100644 --- a/driver

[PATCH 2/5] usb: host: xhci: simplify irq handler return

2016-11-29 Thread Felipe Balbi
Instead of having several return points, let's use a local variable and a single place to return. This makes the code slightly easier to read. Signed-off-by: Felipe Balbi --- drivers/usb/host/xhci-ring.c | 31 --- 1 file changed, 16 insertions(+), 15 dele

[PATCH 3/5] usb: host: xhci: clear only STS_EINT

2016-11-29 Thread Felipe Balbi
Many other bits in USBSTS register are "clear-by-writing-1". Let's make sure that we clear *only* STS_EINT and not any of the other bits as they might be needed later. Signed-off-by: Felipe Balbi --- drivers/usb/host/xhci-ring.c | 3 +-- 1 file changed, 1 insertion(+), 2 del

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