From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Raj Kumar <rajkumar278@hotmail.com>
Cc: linux-pm@lists.linux-foundation.org
Subject: Re: Question about hibernation
Date: Thu, 14 Oct 2010 20:59:26 +0200 [thread overview]
Message-ID: <201010142059.26869.rjw@sisk.pl> (raw)
In-Reply-To: <BLU102-W13CE4234FF4484062541F8EB560@phx.gbl>
On Thursday, October 14, 2010, Raj Kumar wrote:
>
> Hi Rafael,
Hi,
> Thanks for your quick reply.
>
> 1) I already implemented this with dev_pm_ops. I used suspend and resume callbacks
> whose prototype is like
>
> struct dev_pm_ops power_mgmt_ops
> {
> .suspend = powermanagement_suspend,
> .resume = powermanagement_resume
>
> }
>
> int powermanagement_suspend(device *dev)
> {
>
> }
>
> In normal suspend to ram mode it will work. But will it work in case of hibernation also?
It may be sufficient to point hibernate-specific callback pointers to your
suspend/resume routines:
struct dev_pm_ops power_mgmt_ops
{
.suspend = powermanagement_suspend,
.resume = powermanagement_resume,
.freeze = powermanagement_suspend,
.thaw = powermanagement_resume,
.poweroff = powermanagement_suspend,
.restore = powermanagement_resume,
}
depending on the particular needs of your driver.
> if yes, since in suspend and resume call backs, only the device structure is provided, so how can
> then person can identify it is suspend to ram or hibernation?
See above.
> or for hibernation, poweroff and restore function should be implemented which is similar
> to suspend and resume call backs in case of suspend to ram?
Yes.
Thanks,
Rafael
next prev parent reply other threads:[~2010-10-14 18:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.23.1286318684.6175.linux-pm@lists.linux-foundation.org>
2010-10-08 10:32 ` Question about hibernation Raj Kumar
2010-10-08 19:31 ` Rafael J. Wysocki
2010-10-14 8:20 ` Raj Kumar
2010-10-14 9:51 ` Rafael J. Wysocki
2010-10-14 11:47 ` Raj Kumar
2010-10-14 18:59 ` Rafael J. Wysocki [this message]
2011-01-04 21:14 Question about timers during system suspend Raj Kumar
2011-01-04 23:05 ` Rafael J. Wysocki
2011-01-04 23:57 ` Raj Kumar
2011-01-05 8:27 ` Rafael J. Wysocki
2011-03-18 13:45 ` Question about hibernation Raj Kumar
2011-03-18 14:09 ` Oliver Neukum
2011-03-19 23:47 ` Raj Kumar
-- strict thread matches above, loose matches on Subject: below --
2010-08-24 13:15 Runtime power management during system resume Raj Kumar
2010-08-24 14:30 ` Alan Stern
2010-08-24 15:17 ` Raj Kumar
2010-08-25 13:27 ` Raj Kumar
2010-08-26 13:40 ` Raj Kumar
2010-09-18 11:49 ` (no subject) Raj Kumar
2010-10-05 21:40 ` Question about hibernation Raj Kumar
2010-10-05 22:43 ` Rafael J. Wysocki
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=201010142059.26869.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=linux-pm@lists.linux-foundation.org \
--cc=rajkumar278@hotmail.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 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.