LKML Archive on
help / color / mirror / Atom feed
From: Pavel Machek <>
To: "Rafael J. Wysocki" <>
Cc: pm list <>,
	ACPI Devel Maling List <>,
	Alan Stern <>, Greg KH <>,
	Len Brown <>, LKML <>,
	Alexey Starikovskiy <>,
	David Brownell <>,
	Benjamin Herrenschmidt <>,
	Oliver Neukum <>,
	Nigel Cunningham <>
Subject: Re: [RFC][PATCH 1/3] PM: Introduce new top level suspend and hibernation callbacks (rev. 7)
Date: Wed, 2 Apr 2008 15:12:15 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Wed 2008-04-02 02:09:46, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <>
> Introduce 'struct pm_ops' and 'struct pm_ext_ops' ('ext' meaning
> 'extended') representing suspend and hibernation operations for bus
> types, device classes, device types and device drivers.
> Modify the PM core to use 'struct pm_ops' and 'struct pm_ext_ops'
> objects, if defined, instead of the ->suspend() and ->resume(),
> ->suspend_late(), and ->resume_early() callbacks (the old callbacks
> will be considered as legacy and gradually phased out).
> The main purpose of doing this is to separate suspend (aka S2RAM and
> standby) callbacks from hibernation callbacks in such a way that the
> new callbacks won't take arguments and the semantics of each of them
> will be clearly specified.  This has been requested for multiple
> times by many people, including Linus himself, and the reason is that
> within the current scheme if ->resume() is called, for example, it's
> difficult to say why it's been called (ie. is it a resume from RAM or
> from hibernation or a suspend/hibernation failure etc.?).
> The second purpose is to make the suspend/hibernation callbacks more
> flexible so that device drivers can handle more than they can within
> the current scheme.  For example, some drivers may need to prevent
> new children of the device from being registered before their
> ->suspend() callbacks are executed or they may want to carry out some
> operations requiring the availability of some other devices, not
> directly bound via the parent-child relationship, in order to prepare
> for the execution of ->suspend(), etc.
> Ultimately, we'd like to stop using the freezing of tasks for suspend
> and therefore the drivers' suspend/hibernation code will have to take
> care of the handling of the user space during suspend/hibernation.
> That, in turn, would be difficult within the current scheme, without
> the new ->prepare() and ->complete() callbacks.
> Signed-off-by: Rafael J. Wysocki <>


(cesky, pictures)

  reply	other threads:[~2008-04-02 13:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-02  0:07 [RFC][PATCH 0/3] PM: Rework suspend and hibernation code for devices (rev. 4) Rafael J. Wysocki
2008-04-02  0:09 ` [RFC][PATCH 1/3] PM: Introduce new top level suspend and hibernation callbacks (rev. 7) Rafael J. Wysocki
2008-04-02 13:12   ` Pavel Machek [this message]
2008-04-03 18:50   ` [RFC][PATCH 1/3] use new pm_ops in DRM drivers Jesse Barnes
2008-04-03 21:23     ` Rafael J. Wysocki
2008-04-03 21:41       ` Jesse Barnes
2008-04-03 21:47     ` Benjamin Herrenschmidt
2008-04-03 23:48       ` Jesse Barnes
2008-04-02  0:10 ` [RFC][PATCH 2/3] PM: New suspend and hibernation callbacks for platform bus type (rev. 3) Rafael J. Wysocki
2008-04-02 13:14   ` Pavel Machek
2008-04-02  0:11 ` [RFC][PATCH 3/3] PM: New suspend and hibernation callbacks for PCI " Rafael J. Wysocki
2008-03-25 20:23   ` Pavel Machek

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:

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

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \ \

* 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).