On Sunday, 6 of January 2008, David Brownell wrote: > On Saturday 05 January 2008, Rafael J. Wysocki wrote: > > + * @open: Initialise a transition to given system sleep state. > > + * @open() is executed right prior to suspending devices. The information > > + * conveyed to the platform code by @open() should be disregarded by it as > > + * soon as @close() is executed. If @open() fails (ie. returns nonzero), > > * @prepare(), @enter() and @finish() will not be called by the PM core. > > * This callback is optional. However, if it is implemented, the argument > > * passed to @enter() is meaningless and should be ignored. > ^^^^^^^^^^^ > Surely this should say "redundant", not "meaningless"? > > > > + * @close: Called by the PM core right after resuming devices, to indicate to > > + * the platform that the system has returned to the working state. > > Or the state transition has aborted ... > > > + * This callback is optional, but should be implemented by the platforms > > + * that implement @open(). > > "..., but platforms which implement @open() should also provide a @close() > which cleans up transitions which aborted before @enter()." > > Otherwise it seems rather unclear why this exists, since all platforms know > that things are "normal" as soon as enter() gets back from its transition. > (What can I say ... I like to see things be clear!) Yes, systems may do more > than that when it gets this call; but the minimum involves just that cleanup. Thanks for the comments. They will be taken into account in the final version of the patch. Greetings, Rafael _______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm