Power management arrives
The -test4 patches made a number of changes. Perhaps the most significant were the move of the device suspend() and resume() methods out of the device structure and into the bus_type structure. Bus-level code now is explicitly responsible for handling power management operations on devices attached to the bus.
Also changed in -test4 was the software suspend code; this code has been massively reworked and cleaned up. A number of panic() calls have been removed, requirements have been made explicit, the underlying mechanisms are more flexible, and the code is somewhat easier to read. The only problem is that, in -test4, software suspend also no longer works. The various problems which were introduced are being fixed, but one kernel developer in particular - the 2.6 software suspend maintainer - has been very loud in his criticisms and complaints. As a result, Patrick has stated that he will no longer go anywhere near the software suspend code. He evidently has his own implementation which he has chosen not to merge so far; it may put in an appearance in the near future.
Patrick also took some grief for the removal of /proc/acpi/sleep, which no longer fits well into the power management structure. It is, however, an interface which has been present for a while, and can thus break user-space programs.
Given all that, it is perhaps not surprising that Patrick announced his next set of changes on linux-kernel before sending them off to Linus. With these changes, the various suspend states all work with ACPI - at least, on a system without much going on. There is still a lot of work to do, especially with regard to adding driver support. But things appear to be heading in the right direction.
The new set of patches restores /proc/acpi/sleep, and the older
software_suspend() function (as a wrapper for the current
pm_suspend() function) as well. A number of software suspend
improvements have been added. And various other aspects of the code
have been cleaned up. With one exception, the developers are not
complaining about the new power management code. With luck, one of the
remaining 2.6 rough edges will soon be smoothed out.
