Re: [PATCH V2] USB: initialize or shutdown PHY when add or remove host controller

2013-06-25 Thread Felipe Balbi
On Tue, Jun 25, 2013 at 04:37:11PM +0300, Roger Quadros wrote: > On 06/24/2013 10:36 PM, Felipe Balbi wrote: > > On Thu, Jun 20, 2013 at 01:25:31PM -0400, Alan Stern wrote: > >> On Thu, 20 Jun 2013, Felipe Balbi wrote: > >> > In fact, the PHY setting and handling is related to platform or SOC,

Re: [PATCH V2] USB: initialize or shutdown PHY when add or remove host controller

2013-06-25 Thread Roger Quadros
On 06/24/2013 10:36 PM, Felipe Balbi wrote: > On Thu, Jun 20, 2013 at 01:25:31PM -0400, Alan Stern wrote: >> On Thu, 20 Jun 2013, Felipe Balbi wrote: >> In fact, the PHY setting and handling is related to platform or SOC, and for different SOC they can have same EHCI HCD but they PHY

Re: [PATCH V2] USB: initialize or shutdown PHY when add or remove host controller

2013-06-24 Thread Felipe Balbi
Hi, On Tue, Jun 25, 2013 at 09:25:30AM +0800, Chao Xie wrote: > >> It is same as clk, irq requested by ehci-xxx driver. > > > > clocks could be handled generically in some cases, we have pm_clk_add() > > for a reason ;-) > > > > Also, clock handling can be hidden under pm_runtime callbacks (say, >

Re: [PATCH V2] USB: initialize or shutdown PHY when add or remove host controller

2013-06-24 Thread Chao Xie
On Tue, Jun 25, 2013 at 3:45 AM, Felipe Balbi wrote: > Hi, > > On Fri, Jun 21, 2013 at 09:07:59AM +0800, Chao Xie wrote: >> On Fri, Jun 21, 2013 at 1:25 AM, Alan Stern >> wrote: >> > On Thu, 20 Jun 2013, Felipe Balbi wrote: >> > >> >> > In fact, the PHY setting and handling is related to platfor

Re: [PATCH V2] USB: initialize or shutdown PHY when add or remove host controller

2013-06-24 Thread Felipe Balbi
Hi, On Fri, Jun 21, 2013 at 09:07:59AM +0800, Chao Xie wrote: > On Fri, Jun 21, 2013 at 1:25 AM, Alan Stern wrote: > > On Thu, 20 Jun 2013, Felipe Balbi wrote: > > > >> > In fact, the PHY setting and handling is related to platform or SOC, > >> > and for different SOC they can > >> > have same EH

Re: [PATCH V2] USB: initialize or shutdown PHY when add or remove host controller

2013-06-24 Thread Felipe Balbi
On Thu, Jun 20, 2013 at 01:25:31PM -0400, Alan Stern wrote: > On Thu, 20 Jun 2013, Felipe Balbi wrote: > > > > In fact, the PHY setting and handling is related to platform or SOC, > > > and for different SOC they can > > > have same EHCI HCD but they PHY handling can be different. > > > Omap'a cas

Re: [PATCH V2] USB: initialize or shutdown PHY when add or remove host controller

2013-06-20 Thread Chao Xie
correct for irq. irq number is get by gludriver, while irq is requested by EHCO HCD. On Fri, Jun 21, 2013 at 9:07 AM, Chao Xie wrote: > On Fri, Jun 21, 2013 at 1:25 AM, Alan Stern wrote: >> On Thu, 20 Jun 2013, Felipe Balbi wrote: >> >>> > In fact, the PHY setting and handling is related to plat

Re: [PATCH V2] USB: initialize or shutdown PHY when add or remove host controller

2013-06-20 Thread Chao Xie
On Fri, Jun 21, 2013 at 1:25 AM, Alan Stern wrote: > On Thu, 20 Jun 2013, Felipe Balbi wrote: > >> > In fact, the PHY setting and handling is related to platform or SOC, >> > and for different SOC they can >> > have same EHCI HCD but they PHY handling can be different. >> > Omap'a case is the exam

Re: [PATCH V2] USB: initialize or shutdown PHY when add or remove host controller

2013-06-20 Thread Alan Stern
On Thu, 20 Jun 2013, Felipe Balbi wrote: > > In fact, the PHY setting and handling is related to platform or SOC, > > and for different SOC they can > > have same EHCI HCD but they PHY handling can be different. > > Omap'a case is the example, and i think some other vendors may have > > silimar ca

Re: [PATCH V2] USB: initialize or shutdown PHY when add or remove host controller

2013-06-20 Thread Felipe Balbi
Hi, On Thu, Jun 20, 2013 at 08:53:05AM +0800, Chao Xie wrote: > >> @@ -2674,6 +2693,9 @@ void usb_remove_hcd(struct usb_hcd *hcd) > >> free_irq(hcd->irq, hcd); > >> } > >> > >> + if (hcd->phy) > >> + usb_phy_shutdown(hcd->phy); > >> + > >> usb_put_

Re: [PATCH V2] USB: initialize or shutdown PHY when add or remove host controller

2013-06-19 Thread Chao Xie
On Wed, Jun 19, 2013 at 3:51 PM, Roger Quadros wrote: > Hi Chao, > > On 06/19/2013 05:31 AM, Chao Xie wrote: >> Some controller need software to initialize PHY before add >> host controller, and shut down PHY after remove host controller. >> Add the generic code for these controllers so they do no

Re: [PATCH V2] USB: initialize or shutdown PHY when add or remove host controller

2013-06-19 Thread Roger Quadros
Hi Chao, On 06/19/2013 05:31 AM, Chao Xie wrote: > Some controller need software to initialize PHY before add > host controller, and shut down PHY after remove host controller. > Add the generic code for these controllers so they do not need > do it in its own host controller driver. > > Signed-o

Re: [PATCH V2] USB: initialize or shutdown PHY when add or remove host controller

2013-06-18 Thread Chao Xie
On Wed, Jun 19, 2013 at 10:48 AM, Greg KH wrote: > On Tue, Jun 18, 2013 at 10:31:20PM -0400, Chao Xie wrote: >> Some controller need software to initialize PHY before add >> host controller, and shut down PHY after remove host controller. >> Add the generic code for these controllers so they do no

Re: [PATCH V2] USB: initialize or shutdown PHY when add or remove host controller

2013-06-18 Thread Greg KH
On Tue, Jun 18, 2013 at 10:31:20PM -0400, Chao Xie wrote: > Some controller need software to initialize PHY before add > host controller, and shut down PHY after remove host controller. > Add the generic code for these controllers so they do not need > do it in its own host controller driver. Why?

[PATCH V2] USB: initialize or shutdown PHY when add or remove host controller

2013-06-18 Thread Chao Xie
Some controller need software to initialize PHY before add host controller, and shut down PHY after remove host controller. Add the generic code for these controllers so they do not need do it in its own host controller driver. Signed-off-by: Chao Xie --- drivers/usb/core/hcd.c | 24 ++