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

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

 



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.

- Dave
_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux