From: Pavel Machek <pavel@ucw.cz>
To: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: linux-pm@lists.linux-foundation.org,
linux-kernel@vger.kernel.org, Greg Kroah-Hartman <gregkh@suse.de>,
Len Brown <len.brown@intel.com>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
kyungmin.park@samsung.com, myungjoo.ham@gmail.com
Subject: Re: [RFC PATCH] PM / Core: suspend_again cb for syscore_ops
Date: Wed, 20 Apr 2011 12:36:41 +0200 [thread overview]
Message-ID: <20110420103641.GA1789@ucw.cz> (raw)
In-Reply-To: <1303288106-2965-1-git-send-email-myungjoo.ham@samsung.com>
Hi!
> A system or a device may need to control suspend/wakeup events. It may
> want to wakeup the system after a predefined amount of time or at a
> predefined event decided while entering suspend for polling or delayed
> work. Then, it may want to enter suspend again if its predefined wakeup
> condition is the only wakeup reason and there is no outstanding events;
> thus, it does not wakeup the userspace unnecessary and keeps suspended
> as long as possible (saving the power).
Nice. Zaurus needs it, exactly due to this reason:
> 2. Execute critical "delayed work" at suspend.
> A driver or a system/board may have a delayed work (or any similar
> things) that it wants to execute at the requested time.
> For example, some chargers want to check the battery voltage some
> time (e.g., 30 seconds) after the battery is fully charged and the
> charger stops. Then, the charger restarts charging if the voltage has
> dropped more than a threshold, which is smaller than "restart-charger"
> voltage, which is a threshold to restart charging regardless of the
> time passed.
Yep, and zaurus also needs it to stop charging.
> The system enters the suspend again if and only if all of the following
> conditions are met:
> 1. None of suspend_again ops returned "I want to stop suspend"
> (suspend_again returns SUSPEND_AGAIN_STOP).
> 2. At least one of suspend_again ops returned "I want to suspend again"
> (suspend_again returns SUSPEND_AGAIN_CONTINUE)
Better naming could be SUSPEND_AGAIN and VETO_RESUSPEND or
SUSPEND_AGAIN_VETO .
> Anyway, the following features may need to be added later:
> 1. An API to allow devices to express next desired wakeup-time. Then,
> the framework will combine them and setup RTC alarm accordingly and
> save/restore previously registered RTC alarms.
Yep.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2011-04-20 13:21 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-20 8:28 MyungJoo Ham
2011-04-20 10:36 ` Pavel Machek [this message]
2011-04-20 20:28 ` Rafael J. Wysocki
2011-04-21 7:03 ` MyungJoo Ham
[not found] ` <1303781471-2477-1-git-send-email-myungjoo.ham@samsung.com>
2011-04-26 11:47 ` [RFC PATCH v2 1/3] PM / Core: suspend_again callback for device PM Rafael J. Wysocki
2011-04-26 13:17 ` Greg KH
2011-04-26 20:38 ` Pavel Machek
2011-04-26 20:49 ` Rafael J. Wysocki
2011-04-26 21:11 ` Pavel Machek
2011-04-26 21:36 ` Rafael J. Wysocki
2011-04-26 22:06 ` Pavel Machek
2011-04-26 20:57 ` Greg KH
2011-04-26 22:14 ` Pavel Machek
2011-04-26 20:35 ` Pavel Machek
2011-04-26 20:47 ` Rafael J. Wysocki
2011-04-26 21:06 ` Pavel Machek
2011-04-26 21:46 ` Rafael J. Wysocki
2011-04-26 22:10 ` Pavel Machek
2011-04-26 22:32 ` Rafael J. Wysocki
2011-04-27 6:36 ` MyungJoo Ham
2011-04-27 9:46 ` Stanislav Brabec
2011-04-27 10:47 ` MyungJoo Ham
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110420103641.GA1789@ucw.cz \
--to=pavel@ucw.cz \
--cc=gregkh@suse.de \
--cc=kyungmin.park@samsung.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=myungjoo.ham@gmail.com \
--cc=myungjoo.ham@samsung.com \
--cc=rjw@sisk.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome