<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/pm.h, branch linux-2.6.22.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-2.6.22.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-2.6.22.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2007-07-01T19:29:44+00:00</updated>
<entry>
<title>PM: introduce set_target method in pm_ops</title>
<updated>2007-07-01T19:29:44+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2007-07-01T19:07:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2391dae3e36c19fe668c71eac2eb8344dbaaf46d'/>
<id>urn:sha1:2391dae3e36c19fe668c71eac2eb8344dbaaf46d</id>
<content type='text'>
Commit 52ade9b3b97fd3bea42842a056fe0786c28d0555 changed the suspend code
ordering to execute pm_ops-&gt;prepare() after the device model per-device
.suspend() calls in order to fix some ACPI-related issues.  Unfortunately, it
broke the at91 platform which assumed that pm_ops-&gt;prepare() would be called
before suspending devices.

at91 used pm_ops-&gt;prepare() to get notified of the target system sleep state,
so that it could use this information while suspending devices.  However, with
the current suspend code ordering pm_ops-&gt;prepare() is called too late for
this purpose.  Thus, at91 needs an additional method in 'struct pm_ops' that
will be used for notifying the platform of the target system sleep state.
Moreover, in the future such a method will also be needed by ACPI.

This patch adds the .set_target() method to 'struct pm_ops' and makes the
suspend code call it, if implemented, before executing the device model
per-device .suspend() calls.  It also modifies the at91 code to use
pm_ops-&gt;set_target() instead of pm_ops-&gt;prepare().

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Cc: Pavel Machek &lt;pavel@ucw.cz&gt;
Cc: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Cc: Len Brown &lt;lenb@kernel.org&gt;
Cc: Greg KH &lt;greg@kroah.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>PM: Separate hibernation code from suspend code</title>
<updated>2007-05-09T19:30:48+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2007-05-09T09:33:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a3d25c275d383975504dc53c25b691df59bd3c48'/>
<id>urn:sha1:a3d25c275d383975504dc53c25b691df59bd3c48</id>
<content type='text'>
[ With Johannes Berg &lt;johannes@sipsolutions.net&gt; ]

Separate the hibernation (aka suspend to disk code) from the other suspend
code.  In particular:

 * Remove the definitions related to hibernation from include/linux/pm.h
 * Introduce struct hibernation_ops and a new hibernate() function to hibernate
   the system, defined in include/linux/suspend.h
 * Separate suspend code in kernel/power/main.c from hibernation-related code
   in kernel/power/disk.c and kernel/power/user.c (with the help of
   hibernation_ops)
 * Switch ACPI (the only user of pm_ops.pm_disk_mode) to hibernation_ops

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Cc: Greg KH &lt;greg@kroah.com&gt;
Cc: Pavel Machek &lt;pavel@ucw.cz&gt;
Cc: Nigel Cunningham &lt;nigel@nigel.suspend2.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>pm: include EIO from errno-base.h</title>
<updated>2007-04-30T23:40:41+00:00</updated>
<author>
<name>David Rientjes</name>
<email>rientjes@google.com</email>
</author>
<published>2007-04-30T22:09:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=14e38ac823b7b25e3f4e563c182f93fde78167d6'/>
<id>urn:sha1:14e38ac823b7b25e3f4e563c182f93fde78167d6</id>
<content type='text'>
For backwards compatibility, call_platform_enable_wakeup() can return 0
instead of -EIO since we aren't guaranteed to have errno defined.

Cc: David Brownell &lt;david-b@pacbell.net&gt;
Signed-off-by: David Rientjes &lt;rientjes@google.com&gt;
Cc: "Randy.Dunlap" &lt;rdunlap@xenotime.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>power management: force pm_ops.valid callback to be assigned</title>
<updated>2007-04-30T23:40:40+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes@sipsolutions.net</email>
</author>
<published>2007-04-30T22:09:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9684e51cd157607f0727c1550e7df6e31de40808'/>
<id>urn:sha1:9684e51cd157607f0727c1550e7df6e31de40808</id>
<content type='text'>
This patch changes the docs and behaviour from "all states valid" to "no
states valid" if no .valid callback is assigned.  Users of pm_ops that only
need mem sleep can assign pm_valid_only_mem without any overhead, others
will require more elaborate callbacks.

Now that all users of pm_ops have a .valid callback this is a safe thing to
do and prevents things from getting messy again as they were before.

Signed-off-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Looks-okay-to: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Cc: &lt;linux-pm@lists.linux-foundation.org&gt;
Cc: Greg KH &lt;greg@kroah.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>power management: implement pm_ops.valid for everybody</title>
<updated>2007-04-30T23:40:40+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes@sipsolutions.net</email>
</author>
<published>2007-04-30T22:09:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e8c9c502690efd24b7055bf608e7a3c34216848b'/>
<id>urn:sha1:e8c9c502690efd24b7055bf608e7a3c34216848b</id>
<content type='text'>
Almost all users of pm_ops only support mem sleep, don't check in .valid and
don't reject any others in .prepare so users can be confused if they check
/sys/power/state, especially when new states are added (these would then
result in s-t-r although they're supposed to be something different).

This patch implements a generic pm_valid_only_mem function that is then
exported for users and puts it to use in almost all existing pm_ops.

Signed-off-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Cc: David Brownell &lt;david-b@pacbell.net&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Cc: linux-pm@lists.linux-foundation.org
Cc: Len Brown &lt;lenb@kernel.org&gt;
Acked-by: Russell King &lt;rmk@arm.linux.org.uk&gt;
Cc: Greg KH &lt;greg@kroah.com&gt;
Cc: "Rafael J. Wysocki" &lt;rjw@sisk.pl&gt;
Cc: Paul Mundt &lt;lethal@linux-sh.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>power management: remove firmware disk mode</title>
<updated>2007-04-30T23:40:40+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes@sipsolutions.net</email>
</author>
<published>2007-04-30T22:09:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=11d77d0c01b80e44c7aceb21928508dafce774f9'/>
<id>urn:sha1:11d77d0c01b80e44c7aceb21928508dafce774f9</id>
<content type='text'>
This patch removes the firmware disk suspend mode which is the wrong approach,
it is supposed to be used for implementing firmware-based disk suspend but
cannot actually be used for that.

Signed-off-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Cc: &lt;linux-pm@lists.linux-foundation.org&gt;
Cc: David Brownell &lt;david-b@pacbell.net&gt;
Cc: Len Brown &lt;lenb@kernel.org&gt;
Acked-by: Russell King &lt;rmk@arm.linux.org.uk&gt;
Cc: Greg KH &lt;greg@kroah.com&gt;
Cc: "Rafael J. Wysocki" &lt;rjw@sisk.pl&gt;
Cc: Paul Mundt &lt;lethal@linux-sh.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>rework pm_ops pm_disk_mode, kill misuse</title>
<updated>2007-04-30T23:40:40+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes@sipsolutions.net</email>
</author>
<published>2007-04-30T22:09:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fe0c935a6cbf25d72a27c7a345df8a2151de0b74'/>
<id>urn:sha1:fe0c935a6cbf25d72a27c7a345df8a2151de0b74</id>
<content type='text'>
This patch series cleans up some misconceptions about pm_ops.  Some users of
the pm_ops structure attempt to use it to stop the user from entering suspend
to disk, this, however, is not possible since the user can always use
"shutdown" in /sys/power/disk and then the pm_ops are never invoked.  Also,
platforms that don't support suspend to disk simply should not allow
configuring SOFTWARE_SUSPEND (read the help text on it, it only selects
suspend to disk and nothing else, all the other stuff depends on PM).

The pm_ops structure is actually intended to provide a way to enter
platform-defined sleep states (currently supported states are "standby" and
"mem" (suspend to ram)) and additionally (if SOFTWARE_SUSPEND is configured)
allows a platform to support a platform specific way to enter low-power mode
once everything has been saved to disk.  This is currently only used by ACPI
(S4).

This patch:

The pm_ops.pm_disk_mode is used in totally bogus ways since nobody really
seems to understand what it actually does.

This patch clarifies the pm_disk_mode description.

It also removes all the arm and sh users that think they can veto suspend to
disk via pm_ops; not so since the user can always do echo shutdown &gt;
/sys/power/disk, they need to find a better way involving Kconfig or such.

ACPI is the only user left with a non-zero pm_disk_mode.

The patch also sets the default mode to shutdown again, but when a new pm_ops
is registered its pm_disk_mode is selected as default, that way the default
stays for ACPI where it is apparently required.

Signed-off-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Cc: David Brownell &lt;david-b@pacbell.net&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Cc: &lt;linux-pm@lists.linux-foundation.org&gt;
Cc: Len Brown &lt;lenb@kernel.org&gt;
Acked-by: Russell King &lt;rmk@arm.linux.org.uk&gt;
Cc: Greg KH &lt;greg@kroah.com&gt;
Cc: "Rafael J. Wysocki" &lt;rjw@sisk.pl&gt;
Acked-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>s2ram: add arch irq disable/enable hooks</title>
<updated>2007-04-27T17:57:33+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes@sipsolutions.net</email>
</author>
<published>2007-04-26T09:43:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a53c46dc8253cc613ad66a2ca7aad6de8b7e61b9'/>
<id>urn:sha1:a53c46dc8253cc613ad66a2ca7aad6de8b7e61b9</id>
<content type='text'>
After some more discussion this patch replaces it:

From: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Subject: suspend: add arch irq disable/enable hooks

For powermac, we need to do some things between suspending devices and
device_power_off, for example setting the decrementer. This patch
allows architectures to define arch_s2ram_{en,dis}able_irqs in their
asm/suspend.h to have control over this step.

Signed-off-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</content>
</entry>
<entry>
<title>define platform wakeup hook, use in pci_enable_wake()</title>
<updated>2007-04-27T17:57:33+00:00</updated>
<author>
<name>David Brownell</name>
<email>david-b@pacbell.net</email>
</author>
<published>2007-04-26T07:12:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=075c1771526c85849ed22298d048bc07e400aee5'/>
<id>urn:sha1:075c1771526c85849ed22298d048bc07e400aee5</id>
<content type='text'>
This defines a platform hook to enable/disable a device as a wakeup event
source.  It's initially for use with ACPI, but more generally it could be used
whenever enable_irq_wake()/disable_irq_wake() don't suffice.

The hook is called -- if available -- inside pci_enable_wake(); and the
semantics of that call are enhanced so that support for PCI PME# is no longer
needed.  It can now work for devices with "legacy PCI PM", when platform
support allows it.  (That support would use some board-specific signal for for
the same purpose as PME#.)

[akpm@linux-foundation.org: Make it compile with CONFIG_PM=n]
Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Cc: Len Brown &lt;lenb@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>power management: fix struct layout and docs</title>
<updated>2007-02-23T22:52:09+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes@sipsolutions.net</email>
</author>
<published>2007-02-16T09:38:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2a9df4945106d62ed9249a44d666fab93c685f7a'/>
<id>urn:sha1:2a9df4945106d62ed9249a44d666fab93c685f7a</id>
<content type='text'>
Because the pm ops in powermac are obviously not using them as intended, I
added documentation for it in kernel-doc format.

Reordering the fields in struct pm_ops not only makes the output of kernel-doc
make more sense but also removes a hole from the structure on 64-bit
platforms.

Signed-off-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Cc: "Randy.Dunlap" &lt;rdunlap@xenotime.net&gt;
Cc: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Cc: Pavel Macheck &lt;pavel@ucw.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
</feed>
