[PATCH v2 0/7] dd fully tested id switch and vbus connect detect support for Chipidea

2012-11-19 Thread Peter Chen
Changes for v2: - split otg support patch to three usb: chipidea: add otg file usb: chipidea: add otg id switch and vbus connect/disconnect detect usb: chipidea: create the gadget at ci_hdrc_probe even at host role - Retire flag CI13XXX_PULLUP_ON_VBUS - Some tiny changes according to alexande

[PATCH v2 1/7] Revert "USB: chipidea: add vbus detect for udc"

2012-11-19 Thread Peter Chen
vbus register is at otgsc, and vbus detect does not belong to device function. Revert this patch, and will move vbus detect function to drivers/usb/chipidea/udc.c This reverts commit 8c4fc031954b4eb72daf13d3c907a985a3eee208. --- drivers/usb/chipidea/ci.h |1 - drivers/usb/chipidea/udc.c |

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

2012-11-19 Thread Peter Chen
Implement struct usb_otg, In that way, calling otg_set_peripheral will not be failed at udc.c. Signed-off-by: Peter Chen --- drivers/usb/chipidea/Makefile |2 +- drivers/usb/chipidea/otg.c| 60 + drivers/usb/chipidea/otg.h|6 3 files

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

2012-11-19 Thread Peter Chen
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 driver, so when switch role fro

[PATCH v2 4/7] usb: chipidea: create the gadget at ci_hdrc_probe even at host role

2012-11-19 Thread Peter Chen
Since we can't load/unload gadget module on the fly, we can't de-init gadget structure during the otg switch. We have to create gadget at the probe function no matter current role is the host or device, of cource, the gadget will not be created for host-only port. Signed-off-by: Peter Chen --- d

[PATCH v2 5/7] usb: chipidea: udc: add pullup/pulldown dp at hw_device_state

2012-11-19 Thread Peter Chen
- During the connect/disconnect host, we need to pullup and pulldown dp - Make sure the dp is not pullup until the vbus is on when flag CI13XXX_PULLUP_ON_VBUS is set - Using hw_device_state when set run/stop bit Signed-off-by: Peter Chen --- drivers/usb/chipidea/udc.c | 10 -- 1 files

[PATCH v2 7/7] usb: chipidea: imx: add internal vbus regulator control

2012-11-19 Thread Peter Chen
- For host, the vbus should always be on. - For otg, the vbus is off defaultly, the vbus needs to be turned on/off when usb role switches. Signed-off-by: Peter Chen --- drivers/usb/chipidea/ci.h |2 + drivers/usb/chipidea/ci13xxx_imx.c | 67 ++-- 2

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

2012-11-19 Thread Marc Kleine-Budde
On 11/19/2012 10:33 AM, 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

Re: [PATCH v2 1/7] Revert "USB: chipidea: add vbus detect for udc"

2012-11-19 Thread Marc Kleine-Budde
On 11/19/2012 10:32 AM, Peter Chen wrote: > vbus register is at otgsc, and vbus detect does not belong > to device function. Revert this patch, and will move > vbus detect function to drivers/usb/chipidea/udc.c > > This reverts commit 8c4fc031954b4eb72daf13d3c907a985a3eee208. > --- What about you

[PATCH v2 6/7] usb: chipidea: udc: retire the flag CI13_PULLUP_ON_VBUS

2012-11-19 Thread Peter Chen
(change CI13XXX to CI13 to avoid junk email check) Now, we have handled vbus session in core driver when the vbus interrupt occurs, so our pullup operations are all according to vbus. Of cource, the software can still call .pullup when device connects to host if it wants to connect/disconnect with

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

2012-11-19 Thread Peter Chen
On Mon, Nov 19, 2012 at 10:38:00AM +0100, Marc Kleine-Budde wrote: > On 11/19/2012 10:33 AM, 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 form

Re: [PATCH v2 1/7] Revert "USB: chipidea: add vbus detect for udc"

2012-11-19 Thread Peter Chen
On Mon, Nov 19, 2012 at 10:38:19AM +0100, Marc Kleine-Budde wrote: > On 11/19/2012 10:32 AM, Peter Chen wrote: > > vbus register is at otgsc, and vbus detect does not belong > > to device function. Revert this patch, and will move > > vbus detect function to drivers/usb/chipidea/udc.c > > > > This

Re: [PATCH 00/16] OMAP USB Host cleanup

2012-11-19 Thread Roger Quadros
Kevin, On 11/16/2012 10:08 PM, Kevin Hilman wrote: > Roger Quadros writes: > >> Hi, >> >> This patchset addresses the following >> >> - Avoid addressing clocks one by one by name and use a for loop + bunch >> of cleanups. >> - Get number of channels/ports dynamically either from revision regis

Re: [PATCH v2 7/7] usb: chipidea: imx: add internal vbus regulator control

2012-11-19 Thread Sascha Hauer
On Mon, Nov 19, 2012 at 05:33:05PM +0800, Peter Chen wrote: > - For host, the vbus should always be on. > - For otg, the vbus is off defaultly, the vbus needs to be > turned on/off when usb role switches. > > Signed-off-by: Peter Chen > --- > drivers/usb/chipidea/ci.h |2 + > driver

[PATCH 1/1] usb: musb: Remove duplicate inclusion of linux/of.h

2012-11-19 Thread Sachin Kamat
linux/of.h was included twice. Signed-off-by: Sachin Kamat --- drivers/usb/musb/musb_dsps.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 7185eb0..96cb84a 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/

Thoughts about bandwidth management

2012-11-19 Thread Alan Stern
Sarah: Improving the bandwidth management in ehci-hcd will require a lot of changes, and some difficult issues have come up. Maybe you can suggest a good way to approach them. The first problem is that when a Set-Interface request fails, the HCD needs to revert to the previous schedule settin

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

2012-11-19 Thread Marc Kleine-Budde
On 11/19/2012 10:33 AM, Peter Chen wrote: > Implement struct usb_otg, In that way, calling otg_set_peripheral > will not be failed at udc.c. > > Signed-off-by: Peter Chen > --- > drivers/usb/chipidea/Makefile |2 +- > drivers/usb/chipidea/otg.c| 60 > ++

Re: 3.4.4: disabling irq

2012-11-19 Thread Alan Stern
On Sat, 17 Nov 2012, Udo van den Heuvel wrote: > The problem still happens. irq 18 is dsiabled every now and then. > This time on different, new hardware. > The motherboard is now a Gigabyte F2A85X-UP4. > Camera is the same pwc cam. > > Recently I removed the USB printer that was attached to the

Re: 3.4.4: disabling irq

2012-11-19 Thread Udo van den Heuvel
On 2012-11-19 17:41, Alan Stern wrote: >> How to proceed next? > > Firstly, what does /proc/interrupts say? # cat /proc/interrupts CPU0 CPU1 CPU2 CPU3 0: 39 0 0 0 IO-APIC-edge timer 1:716721730

[PATCH 325/493] usb: remove use of __devinitdata

2012-11-19 Thread Bill Pemberton
CONFIG_HOTPLUG is going away as an option so __devinitdata is no longer needed. Signed-off-by: Bill Pemberton Cc: Alexander Shishkin Cc: Felipe Balbi Cc: Alan Stern Cc: linux-usb@vger.kernel.org --- drivers/usb/chipidea/ci13xxx_imx.c | 2 +- drivers/usb/gadget/net2272.c | 2 +- dr

[PATCH 431/493] usb: remove use of __devexit

2012-11-19 Thread Bill Pemberton
CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton Cc: Peter Korsgaard Cc: Alexander Shishkin Cc: Felipe Balbi Cc: Li Yang Cc: Alan Stern Cc: Wan ZongShun Cc: Ben Dooks Cc: Kukjin Kim Cc: linux-usb@vger.kernel.org Cc: linux-o

[PATCH 371/493] usb: remove use of __devinitconst

2012-11-19 Thread Bill Pemberton
CONFIG_HOTPLUG is going away as an option so __devinitconst is no longer needed. Signed-off-by: Bill Pemberton Cc: Li Yang Cc: Felipe Balbi Cc: linux-usb@vger.kernel.org Cc: linuxppc-...@lists.ozlabs.org --- drivers/usb/gadget/fsl_qe_udc.c | 2 +- drivers/usb/host/bcma-hcd.c | 2 +- dr

[PATCH 113/493] staging: usbip: remove use of __devexit_p

2012-11-19 Thread Bill Pemberton
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton Cc: Matt Mooney Cc: linux-usb@vger.kernel.org Cc: de...@driverdev.osuosl.org --- drivers/staging/usbip/vhci_hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dr

[PATCH 007/493] usb-core: remove CONFIG_HOTPLUG ifdefs

2012-11-19 Thread Bill Pemberton
Remove conditional code based on CONFIG_HOTPLUG being false. It's always on now in preparation of it going away as an option. Signed-off-by: Bill Pemberton Cc: linux-usb@vger.kernel.org --- drivers/usb/core/driver.c | 25 - drivers/usb/core/message.c | 9 - dr

[PATCH 119/493] usb: remove use of __devexit_p

2012-11-19 Thread Bill Pemberton
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton Cc: Peter Korsgaard Cc: Alexander Shishkin Cc: Felipe Balbi Cc: Li Yang Cc: Alan Stern Cc: Wan ZongShun Cc: Ben Dooks Cc: Kukjin Kim Cc: linux-usb@vger.kernel.org Cc: linux

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

2012-11-19 Thread Sascha Hauer
Hi Peter, > @@ -139,6 +139,7 @@ struct ci13xxx { > enum ci_rolerole; > boolis_otg; > struct work_struct work; > + struct delayed_work dwork; > struct workqueue_struct *wq; > > struc

Re: USB issue with kernel 3.6

2012-11-19 Thread Piergiorgio Sartor
On Sun, Nov 18, 2012 at 12:44:37PM -0500, Alan Stern wrote: > On Sun, 18 Nov 2012, Piergiorgio Sartor wrote: > > > 32830f207691176234b4c4dd17f0d7ab6d87d94b is the first bad commit > > commit 32830f207691176234b4c4dd17f0d7ab6d87d94b > > Author: Alan Stern > > Date: Wed Jul 11 11:22:53 2012 -0400

Re: [PATCH 119/493] usb: remove use of __devexit_p

2012-11-19 Thread Felipe Balbi
Hi, On Mon, Nov 19, 2012 at 01:21:08PM -0500, Bill Pemberton wrote: > CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer > needed. > > Signed-off-by: Bill Pemberton > Cc: Peter Korsgaard > Cc: Alexander Shishkin > Cc: Felipe Balbi > Cc: Li Yang > Cc: Alan Stern > Cc:

Re: [PATCH 325/493] usb: remove use of __devinitdata

2012-11-19 Thread Felipe Balbi
Hi, On Mon, Nov 19, 2012 at 01:24:34PM -0500, Bill Pemberton wrote: > CONFIG_HOTPLUG is going away as an option so __devinitdata is no > longer needed. > > Signed-off-by: Bill Pemberton > Cc: Alexander Shishkin > Cc: Felipe Balbi > Cc: Alan Stern > Cc: linux-usb@vger.kernel.org > --- > d

Re: [PATCH 159/493] usb: remove use of __devinit

2012-11-19 Thread Felipe Balbi
Hi, On Mon, Nov 19, 2012 at 01:21:48PM -0500, Bill Pemberton wrote: > CONFIG_HOTPLUG is going away as an option so __devinit is no longer > needed. > > Signed-off-by: Bill Pemberton > Cc: Peter Korsgaard > Cc: Alexander Shishkin > Cc: Felipe Balbi > Cc: Li Yang > Cc: Alan Stern > Cc: G

Re: [PATCH 371/493] usb: remove use of __devinitconst

2012-11-19 Thread Felipe Balbi
Hi, On Mon, Nov 19, 2012 at 01:25:20PM -0500, Bill Pemberton wrote: > CONFIG_HOTPLUG is going away as an option so __devinitconst is no > longer needed. > > Signed-off-by: Bill Pemberton > Cc: Li Yang > Cc: Felipe Balbi > Cc: linux-usb@vger.kernel.org > Cc: linuxppc-...@lists.ozlabs.org >

Re: [PATCH 431/493] usb: remove use of __devexit

2012-11-19 Thread Felipe Balbi
Hi, On Mon, Nov 19, 2012 at 01:26:20PM -0500, Bill Pemberton wrote: > CONFIG_HOTPLUG is going away as an option so __devexit is no > longer needed. > > Signed-off-by: Bill Pemberton > Cc: Peter Korsgaard > Cc: Alexander Shishkin > Cc: Felipe Balbi > Cc: Li Yang > Cc: Alan Stern > Cc: W

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

2012-11-19 Thread Felipe Balbi
Hi, On Mon, Nov 19, 2012 at 08:17:34PM +0100, Sascha Hauer wrote: > Hi Peter, > > > @@ -139,6 +139,7 @@ struct ci13xxx { > > enum ci_rolerole; > > boolis_otg; > > struct work_struct work; > > + struct delayed_work

Re: Thoughts about bandwidth management

2012-11-19 Thread Sarah Sharp
On Mon, Nov 19, 2012 at 10:50:32AM -0500, Alan Stern wrote: > Sarah: > > Improving the bandwidth management in ehci-hcd will require a lot of > changes, and some difficult issues have come up. Maybe you can suggest > a good way to approach them. > > The first problem is that when a Set-Interfa

[PATCH] UVC: use GFP_ATOMIC under spin lock.

2012-11-19 Thread Cyril Roelandt
Found using the following semantic patch: @@ @@ spin_lock_irqsave(...); ... when != spin_unlock_irqrestore(...); * GFP_KERNEL Signed-off-by: Cyril Roelandt --- drivers/usb/gadget/uvc_video.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/uvc_video.c b

Re: Thoughts about bandwidth management

2012-11-19 Thread Alan Stern
On Mon, 19 Nov 2012, Sarah Sharp wrote: > On Mon, Nov 19, 2012 at 10:50:32AM -0500, Alan Stern wrote: > > Sarah: > > > > Improving the bandwidth management in ehci-hcd will require a lot of > > changes, and some difficult issues have come up. Maybe you can suggest > > a good way to approach th

Re: [PATCH 00/16] OMAP USB Host cleanup

2012-11-19 Thread Kevin Hilman
Roger Quadros writes: > Kevin, > > On 11/16/2012 10:08 PM, Kevin Hilman wrote: >> Roger Quadros writes: >> >>> Hi, >>> >>> This patchset addresses the following >>> >>> - Avoid addressing clocks one by one by name and use a for loop + bunch >>> of cleanups. >>> - Get number of channels/ports

Re: [PATCH v2 7/7] usb: chipidea: imx: add internal vbus regulator control

2012-11-19 Thread Peter Chen
On Mon, Nov 19, 2012 at 11:16:41AM +0100, Sascha Hauer wrote: > > + > > + if (reg_vbus) { > > + if (enabled) > > + regulator_enable(reg_vbus); > > + else > > + regulator_disable(reg_vbus); > > regulator_en|disable can fail, right? Will chan

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

2012-11-19 Thread Peter Chen
On Mon, Nov 19, 2012 at 05:05:16PM +0100, Marc Kleine-Budde wrote: > > +int ci_hdrc_otg_init(struct ci13xxx *ci) > > +{ > > + /* Useless at current */ > > + ci->otg.set_peripheral = ci_otg_set_peripheral; > > + ci->otg.set_host = ci_otg_set_host; > > + if (!IS_ERR_OR_NULL(ci->transceiver))

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

2012-11-19 Thread Peter Chen
On Mon, Nov 19, 2012 at 08:17:34PM +0100, Sascha Hauer wrote: > Hi Peter, > > > @@ -139,6 +139,7 @@ struct ci13xxx { > > enum ci_rolerole; > > boolis_otg; > > struct work_struct work; > > + struct delayed_work d

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

2012-11-19 Thread Sascha Hauer
On Tue, Nov 20, 2012 at 01:54:48PM +0800, Peter Chen wrote: > On Mon, Nov 19, 2012 at 08:17:34PM +0100, Sascha Hauer wrote: > > Hi Peter, > > > > > @@ -139,6 +139,7 @@ struct ci13xxx { > > > enum ci_rolerole; > > > boolis_otg; > > > struct work