Re: [RFC][PATCH 1/7] Suspend: Introduce open() and close() callbacks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux