Re: [PATCH v3 01/11] usb: phy: Add APIs for runtime power management

2013-04-24 Thread Vivek Gautam
On Tue, Apr 23, 2013 at 11:42 PM, Alan Stern st...@rowland.harvard.edu wrote: On Tue, 23 Apr 2013, Vivek Gautam wrote: Hi, On Tue, Apr 23, 2013 at 10:23 PM, Alan Stern st...@rowland.harvard.edu wrote: On Tue, 23 Apr 2013, Vivek Gautam wrote: Alright, so here's my understanding:

Re: [PATCH v3 01/11] usb: phy: Add APIs for runtime power management

2013-04-23 Thread Felipe Balbi
Hi, On Thu, Apr 18, 2013 at 05:20:11PM +0530, Kishon Vijay Abraham I wrote: Adding APIs to handle runtime power management on PHY devices. PHY consumers may need to wake-up/suspend PHYs when they work across autosuspend. Signed-off-by: Vivek Gautam gautam.vi...@samsung.com ---

Re: [PATCH v3 01/11] usb: phy: Add APIs for runtime power management

2013-04-23 Thread Vivek Gautam
Hi, On Thu, Apr 4, 2013 at 8:16 PM, Alan Stern st...@rowland.harvard.edu wrote: Apologies for delay in replying. On Thu, 4 Apr 2013, Felipe Balbi wrote: Some subsystems handle this issue by calling pm_runtime_get_sync() before probing a driver and pm_runtime_put_sync() after unbinding

Re: [PATCH v3 01/11] usb: phy: Add APIs for runtime power management

2013-04-23 Thread Alan Stern
On Tue, 23 Apr 2013, Vivek Gautam wrote: Alright, so here's my understanding: I suggested letting e.g. DWC3 enable the PHY's runtime_pm; Alan said that it could be done before that so that DWC3 sees an enabled PHY during probe. Basically right. Help me to understand the overall

Re: [PATCH v3 01/11] usb: phy: Add APIs for runtime power management

2013-04-23 Thread Vivek Gautam
Hi, On Tue, Apr 23, 2013 at 10:23 PM, Alan Stern st...@rowland.harvard.edu wrote: On Tue, 23 Apr 2013, Vivek Gautam wrote: Alright, so here's my understanding: I suggested letting e.g. DWC3 enable the PHY's runtime_pm; Alan said that it could be done before that so that DWC3 sees an

Re: [PATCH v3 01/11] usb: phy: Add APIs for runtime power management

2013-04-23 Thread Alan Stern
On Tue, 23 Apr 2013, Vivek Gautam wrote: Hi, On Tue, Apr 23, 2013 at 10:23 PM, Alan Stern st...@rowland.harvard.edu wrote: On Tue, 23 Apr 2013, Vivek Gautam wrote: Alright, so here's my understanding: I suggested letting e.g. DWC3 enable the PHY's runtime_pm; Alan said

Re: [PATCH v3 01/11] usb: phy: Add APIs for runtime power management

2013-04-18 Thread Kishon Vijay Abraham I
On Tuesday 02 April 2013 06:10 PM, Vivek Gautam wrote: Hi, On Tue, Apr 2, 2013 at 5:40 PM, Felipe Balbi ba...@ti.com wrote: Hi, On Tue, Apr 02, 2013 at 04:04:01PM +0530, Vivek Gautam wrote: On Mon, Apr 01, 2013 at 07:24:00PM +0530, Vivek Gautam wrote: Adding APIs to handle runtime power

Re: [PATCH v3 01/11] usb: phy: Add APIs for runtime power management

2013-04-04 Thread Felipe Balbi
Hi, On Wed, Apr 03, 2013 at 02:14:02PM -0400, Alan Stern wrote: Lets suppose DWC3 enables runtime_pm on USB 2 type phy, it will try to go into suspend state and thereby call runtime_suspend(), if any. And PHY will come to active state only when its consumer wakes it up, and this

Re: [PATCH v3 01/11] usb: phy: Add APIs for runtime power management

2013-04-04 Thread Vivek Gautam
Hi, On Thu, Apr 4, 2013 at 12:48 PM, Felipe Balbi ba...@ti.com wrote: Hi, On Wed, Apr 03, 2013 at 02:14:02PM -0400, Alan Stern wrote: Lets suppose DWC3 enables runtime_pm on USB 2 type phy, it will try to go into suspend state and thereby call runtime_suspend(), if any. And PHY

Re: [PATCH v3 01/11] usb: phy: Add APIs for runtime power management

2013-04-04 Thread Felipe Balbi
Hi, On Thu, Apr 04, 2013 at 02:26:51PM +0530, Vivek Gautam wrote: Lets suppose DWC3 enables runtime_pm on USB 2 type phy, it will try to go into suspend state and thereby call runtime_suspend(), if any. And PHY will come to active state only when its consumer wakes it up, and

Re: [PATCH v3 01/11] usb: phy: Add APIs for runtime power management

2013-04-04 Thread Alan Stern
On Thu, 4 Apr 2013, Felipe Balbi wrote: Some subsystems handle this issue by calling pm_runtime_get_sync() before probing a driver and pm_runtime_put_sync() after unbinding the driver. If the driver is runtime-PM-enabled, it then does its own put_sync near the end of its probe

Re: [PATCH v3 01/11] usb: phy: Add APIs for runtime power management

2013-04-03 Thread Vivek Gautam
Hi Kishon, On Wed, Apr 3, 2013 at 10:38 AM, Kishon Vijay Abraham I kis...@ti.com wrote: Hi, On Monday 01 April 2013 07:24 PM, Vivek Gautam wrote: Adding APIs to handle runtime power management on PHY devices. PHY consumers may need to wake-up/suspend PHYs when they work across

Re: [PATCH v3 01/11] usb: phy: Add APIs for runtime power management

2013-04-03 Thread Felipe Balbi
Hi, On Wed, Apr 03, 2013 at 11:48:39AM +0530, Vivek Gautam wrote: Adding APIs to handle runtime power management on PHY devices. PHY consumers may need to wake-up/suspend PHYs when they work across autosuspend. Signed-off-by: Vivek Gautam gautam.vi...@samsung.com ---

Re: [PATCH v3 01/11] usb: phy: Add APIs for runtime power management

2013-04-03 Thread Vivek Gautam
Hi Felipe, On Wed, Apr 3, 2013 at 1:45 PM, Felipe Balbi ba...@ti.com wrote: Hi, On Wed, Apr 03, 2013 at 11:48:39AM +0530, Vivek Gautam wrote: Adding APIs to handle runtime power management on PHY devices. PHY consumers may need to wake-up/suspend PHYs when they work across autosuspend.

Re: [PATCH v3 01/11] usb: phy: Add APIs for runtime power management

2013-04-03 Thread Felipe Balbi
HI, On Wed, Apr 03, 2013 at 06:42:48PM +0530, Vivek Gautam wrote: Adding APIs to handle runtime power management on PHY devices. PHY consumers may need to wake-up/suspend PHYs when they work across autosuspend. Signed-off-by: Vivek Gautam gautam.vi...@samsung.com ---

Re: [PATCH v3 01/11] usb: phy: Add APIs for runtime power management

2013-04-03 Thread Felipe Balbi
Hi, On Wed, Apr 03, 2013 at 04:54:14PM +0300, Felipe Balbi wrote: +static inline void usb_phy_autopm_enable(struct usb_phy *x) +{ + if (!x || !x-dev) { + dev_err(x-dev, no PHY or attached device available\n); + return; +

Re: [PATCH v3 01/11] usb: phy: Add APIs for runtime power management

2013-04-03 Thread Vivek Gautam
Hi, On Wed, Apr 3, 2013 at 7:26 PM, Felipe Balbi ba...@ti.com wrote: Hi, On Wed, Apr 03, 2013 at 04:54:14PM +0300, Felipe Balbi wrote: +static inline void usb_phy_autopm_enable(struct usb_phy *x) +{ + if (!x || !x-dev) { + dev_err(x-dev, no PHY or attached

Re: [PATCH v3 01/11] usb: phy: Add APIs for runtime power management

2013-04-03 Thread Felipe Balbi
Hi, On Wed, Apr 03, 2013 at 07:40:44PM +0530, Vivek Gautam wrote: +static inline void usb_phy_autopm_enable(struct usb_phy *x) +{ + if (!x || !x-dev) { + dev_err(x-dev, no PHY or attached device available\n); + return; +

Re: [PATCH v3 01/11] usb: phy: Add APIs for runtime power management

2013-04-03 Thread Vivek Gautam
On Wed, Apr 3, 2013 at 7:48 PM, Felipe Balbi ba...@ti.com wrote: Hi, On Wed, Apr 03, 2013 at 07:40:44PM +0530, Vivek Gautam wrote: +static inline void usb_phy_autopm_enable(struct usb_phy *x) +{ + if (!x || !x-dev) { + dev_err(x-dev, no PHY or attached

Re: [PATCH v3 01/11] usb: phy: Add APIs for runtime power management

2013-04-02 Thread Felipe Balbi
On Mon, Apr 01, 2013 at 07:24:00PM +0530, Vivek Gautam wrote: Adding APIs to handle runtime power management on PHY devices. PHY consumers may need to wake-up/suspend PHYs when they work across autosuspend. Signed-off-by: Vivek Gautam gautam.vi...@samsung.com --- include/linux/usb/phy.h

Re: [PATCH v3 01/11] usb: phy: Add APIs for runtime power management

2013-04-02 Thread Vivek Gautam
Hi, On Tue, Apr 2, 2013 at 1:53 PM, Felipe Balbi ba...@ti.com wrote: On Mon, Apr 01, 2013 at 07:24:00PM +0530, Vivek Gautam wrote: Adding APIs to handle runtime power management on PHY devices. PHY consumers may need to wake-up/suspend PHYs when they work across autosuspend.

Re: [PATCH v3 01/11] usb: phy: Add APIs for runtime power management

2013-04-02 Thread Felipe Balbi
Hi, On Tue, Apr 02, 2013 at 04:04:01PM +0530, Vivek Gautam wrote: On Mon, Apr 01, 2013 at 07:24:00PM +0530, Vivek Gautam wrote: Adding APIs to handle runtime power management on PHY devices. PHY consumers may need to wake-up/suspend PHYs when they work across autosuspend.

Re: [PATCH v3 01/11] usb: phy: Add APIs for runtime power management

2013-04-02 Thread Vivek Gautam
Hi, On Tue, Apr 2, 2013 at 5:40 PM, Felipe Balbi ba...@ti.com wrote: Hi, On Tue, Apr 02, 2013 at 04:04:01PM +0530, Vivek Gautam wrote: On Mon, Apr 01, 2013 at 07:24:00PM +0530, Vivek Gautam wrote: Adding APIs to handle runtime power management on PHY devices. PHY consumers may need to

Re: [PATCH v3 01/11] usb: phy: Add APIs for runtime power management

2013-04-02 Thread Kishon Vijay Abraham I
Hi, On Monday 01 April 2013 07:24 PM, Vivek Gautam wrote: Adding APIs to handle runtime power management on PHY devices. PHY consumers may need to wake-up/suspend PHYs when they work across autosuspend. Signed-off-by: Vivek Gautam gautam.vi...@samsung.com --- include/linux/usb/phy.h | 141

[PATCH v3 01/11] usb: phy: Add APIs for runtime power management

2013-04-01 Thread Vivek Gautam
Adding APIs to handle runtime power management on PHY devices. PHY consumers may need to wake-up/suspend PHYs when they work across autosuspend. Signed-off-by: Vivek Gautam gautam.vi...@samsung.com --- include/linux/usb/phy.h | 141 +++ 1 files