linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Felipe Balbi <balbi@ti.com>,
	Vivek Gautam <gautamvivek1987@gmail.com>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Vivek Gautam <gautam.vivek@samsung.com>,
	linux-usb@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org,
	gregkh@linuxfoundation.org, sarah.a.sharp@linux.intel.com,
	rob.herring@calxeda.com, kgene.kim@samsung.com,
	dianders@chromium.org, t.figa@samsung.com, p.paneri@samsung.com
Subject: Re: [PATCH v3 01/11] usb: phy: Add APIs for runtime power management
Date: Thu, 4 Apr 2013 10:18:32 +0300	[thread overview]
Message-ID: <20130404071832.GD30287@arwen.pp.htv.fi> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1304031410320.2027-100000@iolanthe.rowland.org>

[-- Attachment #1: Type: text/plain, Size: 1676 bytes --]

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 consumer is operational
> > > only when its related PHY is in fully functional state.
> > > So do we have a situation in which this PHY goes into low power state
> > > in its runtime_suspend(),
> > > resulting in non-detection of devices on further attach (since PHY is
> > > in low power state) ?
> > > 
> > > Will the controller (like EHCI/OHCI) be functional now ?
> > 
> > ehci/ohci need to cope with that by calling usb_phy_autopm_get_sync(),
> > right ? (so does DWC3 :-)
> 
> Maybe you guys have already got this all figured out -- if so, feel 
> free to ignore this email.
> 
> 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 routine and get_sync in its release 
> routine.

sounds a bit 'fishy' to me... So a separate entity would call
pm_runtime_get_sync(), even when we don't have registered dev_pm_ops,
then drivers need to check if runtime_pm is enabled and call
pm_runtime_put*() conditionally before returning from probe(). One
remove, we might have another issue: device is already runtime_suspended
(due to e.g. autosuspend) when module is removed, a call to
pm_runtime_put_sync() will be unbalanced. No ?

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2013-04-04  7:18 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-01 13:53 [PATCH v3 00/11] usb: dwc3/xhci/phy: Enable runtime power management Vivek Gautam
2013-04-01 13:54 ` [PATCH v3 01/11] usb: phy: Add APIs for " Vivek Gautam
2013-04-02  8:23   ` Felipe Balbi
2013-04-02 10:34     ` Vivek Gautam
2013-04-02 12:10       ` Felipe Balbi
2013-04-02 12:40         ` Vivek Gautam
2013-04-18 11:50           ` Kishon Vijay Abraham I
2013-04-23 11:15             ` Felipe Balbi
2013-04-03  5:08   ` Kishon Vijay Abraham I
2013-04-03  6:18     ` Vivek Gautam
2013-04-03  8:15       ` Felipe Balbi
2013-04-03 13:12         ` Vivek Gautam
2013-04-03 13:54           ` Felipe Balbi
     [not found]             ` <20130403135414.GG14680-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2013-04-03 13:56               ` Felipe Balbi
2013-04-03 14:10                 ` Vivek Gautam
2013-04-03 14:18                   ` Felipe Balbi
2013-04-03 14:42                     ` Vivek Gautam
2013-04-03 18:14                     ` Alan Stern
2013-04-04  7:18                       ` Felipe Balbi [this message]
2013-04-04  8:56                         ` Vivek Gautam
2013-04-04  9:26                           ` Felipe Balbi
2013-04-04 14:46                             ` Alan Stern
2013-04-23 12:42                               ` Vivek Gautam
2013-04-23 16:53                                 ` Alan Stern
     [not found]                                   ` <Pine.LNX.4.44L0.1304231243040.1679-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2013-04-23 18:05                                     ` Vivek Gautam
2013-04-23 18:12                                       ` Alan Stern
2013-04-24 13:12                                         ` Vivek Gautam
2013-04-01 13:54 ` [PATCH v3 02/11] USB: dwc3: Adjust runtime pm to allow autosuspend Vivek Gautam
2013-04-02  8:29   ` Felipe Balbi
2013-04-03  6:05     ` Vivek Gautam
2013-04-03  8:17       ` Felipe Balbi
2013-04-01 13:54 ` [PATCH v3 03/11] usb: dwc3: Enable runtime pm only after PHYs are initialized Vivek Gautam
2013-04-01 13:54 ` [PATCH v3 04/11] usb: dwc3: Add runtime power management callbacks Vivek Gautam
2013-04-02  8:32   ` Felipe Balbi
2013-04-03  4:59     ` Vivek Gautam
2013-04-01 13:54 ` [PATCH v3 05/11] usb: dwc3: exynos: Enable runtime power management Vivek Gautam
2013-04-02  8:33   ` Felipe Balbi
2013-04-01 13:54 ` [PATCH v3 06/11] usb: xhci: Enable runtime pm in xhci-plat Vivek Gautam
2013-04-01 13:54 ` [PATCH v3 07/11] usb: phy: samsung: Enable runtime power management on usb2phy Vivek Gautam
2013-04-01 13:54 ` [PATCH v3 08/11] usb: phy: samsung: Enable runtime power management on usb3phy Vivek Gautam
2013-04-01 13:54 ` [PATCH v3 09/11] usb: phy: samsung: Add support for external reference clock Vivek Gautam
2013-04-03 17:27 ` [PATCH v3 00/11] usb: dwc3/xhci/phy: Enable runtime power management Sarah Sharp
2013-04-04  5:04   ` Vivek Gautam
2013-04-04  7:10     ` Felipe Balbi
2013-04-04  7:32       ` Vivek Gautam
2013-04-04 16:40         ` Sarah Sharp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130404071832.GD30287@arwen.pp.htv.fi \
    --to=balbi@ti.com \
    --cc=dianders@chromium.org \
    --cc=gautam.vivek@samsung.com \
    --cc=gautamvivek1987@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kgene.kim@samsung.com \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=p.paneri@samsung.com \
    --cc=rob.herring@calxeda.com \
    --cc=sarah.a.sharp@linux.intel.com \
    --cc=stern@rowland.harvard.edu \
    --cc=t.figa@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).