From: Partha Basak <p-basak2@ti.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Keshava Munegowda <keshava_mgowda@ti.com>,
linux-usb@vger.kernel.org, linux-omap@vger.kernel.org,
linux-kernel@vger.kernel.org, Felipe Balbi <balbi@ti.com>,
Anand Gadiyar <gadiyar@ti.com>,
sameo@linux.intel.com, parthab@india.ti.com, tony@atomide.com,
Kevin Hilman <khilman@ti.com>, Benoit Cousson <b-cousson@ti.com>,
paul@pwsan.com, johnstul@us.ibm.com,
Vishwanath Sripathy <vishwanath.bs@ti.com>
Subject: RE: [PATCH 6/6 v2] arm: omap: usb: global Suspend and resume support of ehci and ohci
Date: Tue, 5 Jul 2011 19:30:26 +0530 [thread overview]
Message-ID: <41049fa81376d2973fa760cf061ee460@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1107041147510.12242-100000@netrider.rowland.org>
>-----Original Message-----
>From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
>owner@vger.kernel.org] On Behalf Of Alan Stern
>Sent: Monday, July 04, 2011 9:21 PM
>To: Partha Basak
>Cc: Keshava Munegowda; linux-usb@vger.kernel.org; linux-
>omap@vger.kernel.org; linux-kernel@vger.kernel.org; Felipe Balbi; Anand
>Gadiyar; sameo@linux.intel.com; parthab@india.ti.com; tony@atomide.com;
>Kevin Hilman; Benoit Cousson; paul@pwsan.com; johnstul@us.ibm.com;
>Vishwanath Sripathy
>Subject: RE: [PATCH 6/6 v2] arm: omap: usb: global Suspend and resume
>support of ehci and ohci
>
>On Mon, 4 Jul 2011, Partha Basak wrote:
>
>> >I don't see any point in these routines (and likewise for
>> >omap_ohci_suspend/resume). When the whole system is going to sleep
>> >anyway, what reason is there for enabling runtime PM on the parent
>> >device?
>>
>> Both for EHCI & OHCI, the clocks are owned by the parent (uhh-tll).
>>
>> Calling pm_runtime_put_sync(dev->parent) within omap_ehci_suspend
>> will turn-off the parent clocks in the Suspend path.
>>
>> Similarly, calling pm_runtime_get_sync(dev->parent) within
>> omap_ehci_resume
>> will turn-on the parent clocks in the resume path.
>>
>> This way, all reference counting are implicit within the Runtime PM
>layer
>> and takes care of all combinations of only EHCI insmoded, OHCI
>insmoded,
>> both insmoded etc.
>>
>> When both EHCI & OHCI are suspended, parent clocks will actually be
>> turned OFF and vice-versa.
>>
>> Note that the parent per-se does not have any .suspend & .resume
>hooked
>> up.
>
>Why not? That sounds like a big bug.
This was a design decision since the parent needs to be activated only
when at-least one child is insmoded.
If the chidren are suspended, automatically the parent is suspended
via the pm_runtime_putsync calls to the parent.
So, effectively, we do not need an explicit suspend for the parent.
>
>> At the end of the _probe of parent, the clocks are turned OFF.
>> Subsequently, enabling
>> the parent clocks are entirely done implicitly by the children
>get_sync()
>> in their _probe.
>>
>> Therefore while .suspend/.resume of children are called they call back
>> into the parent to turn-off the clocks.
>
>You have ignored a few very important points:
>
>Firstly, system suspend is supposed to work even when runtime PM is not
>configured.
>
>Secondly, the user can disable runtime PM via sysfs at any time. This
>shouldn't mess up system suspend.
>
>Basically, it's a bad idea to mix up system suspend with runtime PM.
Your observations are correct but this is a generic limitation and Kevin
is working
on this problem in parallel.
As of now, all OMAP drivers are mandated to use ONLY runtime pm framework
for enabling/disabling clocks. I will let Kevin comment further.
>
>Alan Stern
>
>--
>To unsubscribe from this list: send the line "unsubscribe linux-omap" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-07-05 14:00 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-01 18:54 [PATCH 0/6 V2] arm: omap: usb: Runtime PM support for EHCI and OHCI drivers Keshava Munegowda
2011-07-01 18:54 ` [PATCH 1/6 v2] arm: omap: usb: ehci and ohci hwmod structures for omap4 Keshava Munegowda
2011-07-01 18:54 ` [PATCH 2/6 v2] arm: omap: usb: ehci and ohci hwmod structures for omap3 Keshava Munegowda
2011-07-01 18:54 ` [PATCH 3/6 v2] arm: omap: usb: register hwmods of usbhs Keshava Munegowda
2011-07-01 18:54 ` [PATCH 4/6 v2] arm: omap: usb: device name change for the clk names " Keshava Munegowda
2011-07-01 18:54 ` [PATCH 5/6 v2] arm: omap: usb: Runtime PM support Keshava Munegowda
2011-07-01 18:54 ` [PATCH 6/6 v2] arm: omap: usb: global Suspend and resume support of ehci and ohci Keshava Munegowda
2011-07-01 19:06 ` Alan Stern
2011-07-04 5:06 ` Partha Basak
2011-07-04 8:25 ` Felipe Balbi
2011-07-04 9:26 ` Partha Basak
2011-07-04 9:30 ` Felipe Balbi
2011-07-04 11:01 ` Partha Basak
2011-07-04 16:01 ` Alan Stern
2011-07-05 12:52 ` Felipe Balbi
2011-07-05 14:17 ` Alan Stern
2011-07-05 15:53 ` Felipe Balbi
2011-07-05 16:28 ` Alan Stern
2011-07-04 15:50 ` Alan Stern
2011-07-05 14:00 ` Partha Basak [this message]
2011-07-05 14:22 ` Alan Stern
2011-07-05 17:37 ` Kevin Hilman
2011-07-06 17:54 ` Felipe Balbi
2011-07-06 19:20 ` Kevin Hilman
2011-07-06 22:17 ` Felipe Balbi
2011-07-07 4:53 ` Partha Basak
2011-07-07 7:28 ` Felipe Balbi
2011-07-07 10:29 ` [PATCH 1/6 v2] arm: omap: usb: ehci and ohci hwmod structures for omap4 Felipe Balbi
2011-07-07 15:57 ` Kevin Hilman
2011-07-04 17:25 ` [PATCH 0/6 V2] arm: omap: usb: Runtime PM support for EHCI and OHCI drivers Samuel Ortiz
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=41049fa81376d2973fa760cf061ee460@mail.gmail.com \
--to=p-basak2@ti.com \
--cc=b-cousson@ti.com \
--cc=balbi@ti.com \
--cc=gadiyar@ti.com \
--cc=johnstul@us.ibm.com \
--cc=keshava_mgowda@ti.com \
--cc=khilman@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=parthab@india.ti.com \
--cc=paul@pwsan.com \
--cc=sameo@linux.intel.com \
--cc=stern@rowland.harvard.edu \
--cc=tony@atomide.com \
--cc=vishwanath.bs@ti.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