[RFC/RFT][PATCH -mm 0/8] PM: Rework struct pm_ops and related things (take 2)

Rafael J. Wysocki
2007-06-25T22:47:38Z

Hi,

This is the second version of the patch series to rework pm_ops in order to
introduce the set_target() method etc. This time I've takes some Dave's
comments into consideration and I've realized that a method similar to
set_target() is also needed for hibernation, so I've reworked that too, a bit.

The following series of patches:
* introduces the .set_target() method in 'struct pm_ops' so that the platform
code knows in advance what sleep state the system is going to enter (this
is urgently needed by at91 and should go into 2.6.22 as a bugfix)
* makes ACPI use .set_target()
* adds an ACPI helper function for the devices to determine the power state
to put the device into
* moves the definition of 'struct pm_ops' to <include/suspend.h>
* changes the name of 'struct pm_ops' to 'struct platform_suspend_operations'
and modifies the names of some related functions and global variables
accordingly
* modifies 'struct platform_suspend_operations' so that .prepare() and
.finish() don't take arguments (.enter() still takes the state argument,
because some platforms don't need to implement the other callbacks)
* reworks 'struct hibernation_ops' to add the new method analogous to
.set_target()
* renames 'struct hibernation_ops' to 'struct hibernation_platform_operations'
(in analogy with 'struct platform_suspend_operations')
The details are in the changelogs.

The series have been compilation-tested on x86_64 and I'm going to compile
it for all of the affected platforms.

Comments welcome.

Greetings,
Rafael

--
"Premature optimization is the root of all evil." - Donald Knuth

-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html