From: Raj Kumar <rajkumar278@hotmail.com>
To: stern@rowland.harvard.edu
Cc: linux-pm@lists.linux-foundation.org
Subject: Re: Questions about run time power management
Date: Sat, 24 Jul 2010 19:56:45 +0530 [thread overview]
Message-ID: <BLU102-W19F776184395386635AA56EBA40@phx.gbl> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1007231022120.1823-100000@iolanthe.rowland.org>
[-- Attachment #1.1: Type: text/plain, Size: 2977 bytes --]
Hi Alan,
Please see my following points:
Suppose when device is idle, it says to run time power management framework i am idle
and run time power management asks the device's bus (if bus is being used), and
probably the case is if the device does not want to get suspended because of the starting
of the activities immediately , it will return the error to platform bus and platform bus returns this error
to run time power management framework and run time power management will make
the device status active. In the code of
int __pm_runtime_suspend(arguments...)
{
if (retval) {
dev->power.runtime_status = RPM_ACTIVE;
pm_runtime_cancel_pending(dev);
if (retval == -EAGAIN || retval == -EBUSY) {
notify = true;
dev->power.runtime_error = 0;
}
} else {
}
So if the retval is -EAGAIN and -EBUSY, so it means it will again try to make it idle but if the device is
already doing activities , since it is started doing activities then in that case is this error code
ECANCELED is appropriate?
Regards
Raj
> Date: Fri, 23 Jul 2010 10:26:07 -0400
> From: stern@rowland.harvard.edu
> To: rajkumar278@hotmail.com
> CC: linux-pm@lists.linux-foundation.org
> Subject: Re: [linux-pm] Questions about run time power management
>
> On Fri, 23 Jul 2010, Raj Kumar wrote:
>
> > Hi,
> >
> >
> > I am implementing the run time power management in my drivers. So i have the following
> > questions:
> >
> >
> > 1) I am using the work queue approach for run time power management, Now the thing is
> > when the device is idle and it notifies the run time power management via helper function
> > pm_request_idle, and at the same time if resume is done then in that case does the runtime power management
> > cancels the idle and does not invoke any callback like runtime_suspend of driver?
>
> How can a resume occur while the device is idle? Idle means that the
> device isn't suspended -- it's at full power but not doing anything.
> Hence a resume cannot occur at the same time.
>
> > 2) like as mentioned in run time power management document, when the usage_count of device
> > reaches zero, is there any run time power management thread in background that will immediately suspends
> > the device or it is again via helper functions. It seems from the code that usage_count is zero and suspended
> > via helper functions. Is it correct?
>
> All suspends occur via the helper functions, whether a background
> thread is involved or not.
>
> > 3) The third question is more specific about platform bus usage? can the char device driver use platform bus?
> > can char device register as platform device?
>
> Yes. Devices can be registered on any bus.
>
> Alan Stern
>
[-- Attachment #1.2: Type: text/html, Size: 4159 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2010-07-24 14:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-22 21:23 Questions about run time power management Raj Kumar
2010-07-23 14:26 ` Alan Stern
2010-07-24 14:26 ` Raj Kumar [this message]
2010-07-25 15:48 ` Alan Stern
2010-07-28 11:35 ` Raj Kumar
2010-07-28 15:32 ` Alan Stern
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=BLU102-W19F776184395386635AA56EBA40@phx.gbl \
--to=rajkumar278@hotmail.com \
--cc=linux-pm@lists.linux-foundation.org \
--cc=stern@rowland.harvard.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.