From: Pavel Machek <pavel@ucw.cz>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: pm list <linux-pm@lists.linux-foundation.org>,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
Alan Stern <stern@rowland.harvard.edu>, Greg KH <greg@kroah.com>,
Len Brown <lenb@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
Alexey Starikovskiy <astarikovskiy@suse.de>,
David Brownell <david-b@pacbell.net>
Subject: Re: [RFC][PATCH 1/3] PM: Introduce new top level suspend and hibernation callbacks
Date: Tue, 18 Mar 2008 11:01:06 +0100 [thread overview]
Message-ID: <20080318100106.GA10830@elf.ucw.cz> (raw)
In-Reply-To: <200803170022.30345.rjw@sisk.pl>
Hi!
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
ACK.
> + * The externally visible transitions are handled with the help of the following
> + * callbacks included in this structure:
> + *
> + * @prepare: Prepare the device for the upcoming transition, but do NOT change
> + * its hardware state. Prevent new children of the device from being
> + * registered and prevent new calls to the probe method from being made
> + * after @prepare() returns. Also, if a concurrent child registration
> + * or a call to the probe method already in progress is detected by
> + * @prepare(), it may return -EAGAIN, so that the PM core can execute it
> + * once again (e.g. after suspending the newly registered child) to recover
> + * from the race condition. This method is executed for all kinds of
> + * suspend transitions and is immediately followed by one of the suspend
> + * callbacks: @suspend(), @freeze(), @poweroff(), or @quiesce().
> + *
> + * @complete: Undo the changes made by @prepare(). This method is executed for
> + * all kinds of resume transitions, immediately following one of the resume
> + * callbacks: @resume(), @thaw(), @restore(), or @recover(). Also executed
> + * if a suspend callback (@suspend(), @freeze(), @poweroff(), @quiesce())
> + * immediately following a successful @prepare() fails OR if a new child
> + * of the device has been registered during @prepare().
So... we do prepare() but it detects new child, so it returns -EAGAIN.
so we call complete() based on description above
...and then we call prepare() to suspend again?
> + * @suspend: Executed before putting the system into a sleep state in which the
> + * contents of main memory are preserved. Quiesce the device, put it into
content....is?
> + * @resume: Executed after waking the system up from a sleep state in which the
> + * contents of main memory were preserved. Put the device into the
content...is?
> + * @freeze: Hibernation-specific, executed before creating a hibernation image.
> + * Quiesce operations so that a consistent image can be created, but do NOT
> + * otherwise put the device into a low power device state and do NOT emit
> + * system wakeup events. Save in main memory the device settings to be
"Save device settings (used by @restore()) into main memory"?
> + * @quiesce: Hibernation-specific, executed after loading a hibernation image
> + * and before restoring the contents of main memory from it. Quiesce
> + * operations so that the contents of main memory can be restored from the
operations, so ?
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
pomozte zachranit klanovicky les: http://www.ujezdskystrom.info/
next prev parent reply other threads:[~2008-03-18 11:48 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-16 23:20 [RFC][PATCH 0/3] PM: Rework suspend and hibernation code for devices Rafael J. Wysocki
2008-03-16 23:22 ` [RFC][PATCH 1/3] PM: Introduce new top level suspend and hibernation callbacks Rafael J. Wysocki
2008-03-18 10:01 ` Pavel Machek [this message]
2008-03-18 15:10 ` Alan Stern
2008-03-18 23:54 ` Pavel Machek
2008-03-19 1:04 ` Rafael J. Wysocki
2008-03-19 2:44 ` Alan Stern
2008-03-19 3:49 ` Benjamin Herrenschmidt
2008-03-19 15:19 ` Alan Stern
2008-03-20 3:33 ` Benjamin Herrenschmidt
2008-03-20 14:45 ` Alan Stern
2008-03-20 22:32 ` Benjamin Herrenschmidt
2008-03-20 18:26 ` Alan Stern
2008-03-20 22:34 ` Benjamin Herrenschmidt
2008-03-20 22:57 ` Alan Stern
2008-03-19 0:53 ` Greg KH
2008-03-19 9:15 ` Pavel Machek
2008-03-19 13:22 ` Rafael J. Wysocki
2008-03-19 18:07 ` Greg KH
2008-03-16 23:24 ` [RFC][PATCH 2/3] PM: New suspend and hibernation callbacks for platform bus type Rafael J. Wysocki
2008-03-18 10:02 ` Pavel Machek
2008-03-16 23:25 ` [RFC][PATCH 3/3] PM: New suspend and hibernation callbacks for PCI " Rafael J. Wysocki
2008-03-18 10:02 ` Pavel Machek
2008-03-19 0:55 ` Greg KH
2008-03-19 13:24 ` Rafael J. Wysocki
2008-03-19 18:06 ` Greg KH
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=20080318100106.GA10830@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=astarikovskiy@suse.de \
--cc=david-b@pacbell.net \
--cc=greg@kroah.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=rjw@sisk.pl \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox