From: Stefan Seyfried <seife@suse.de>
To: Jiri Kosina <jikos@jikos.cz>
Cc: linux-acpi@intel.com, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@osdl.org>, Len Brown <len.brown@intel.com>
Subject: Re: [PATCH] preserve correct battery state through suspend/resume cycles
Date: Sat, 30 Sep 2006 13:48:18 +0200 [thread overview]
Message-ID: <20060930114817.GA26217@suse.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0609280446230.22576@twin.jikos.cz>
On Thu, Sep 28, 2006 at 04:50:49AM +0200, Jiri Kosina wrote:
> There is a problem in th following scenario(s):
>
> boot -> suspend -> (un)plug battery -> resume
>
> The problem arises in both cases - i.e. suspend with battery plugged in,
> and resume with battery unplugged, or vice versa.
>
> After resume, when the battery status has changed (plugged in -> unplegged
> or unplugged -> plugged in) during the time when the system was sleeping,
> the /proc/acpi/battery/*/* is wrong (showing the state before suspend, not
> the current state).
Is this also needed if you use "platform" method? Also with suspend-to-RAM?
> The following patch adds ->resume method to the ACPI battery handler, which
> has the only aim - to check whether the battery state has changed during sleep,
> and if so, update the ACPI internal data structures, so that information
> published through /proc/acpi/battery/*/* is correct even after suspend/resume
> cycle, during which the battery was removed/inserted.
Although it generally is a good idea to add suspend and resume methods to
all ACPI drivers, it would be interesting to know if you still need this
when using the correct method (platform) instead of the incorrect default
method (shutdown).
echo "platform" > /sys/power/disk
echo "disk" > /sys/power/state
--
Stefan Seyfried \ "I didn't want to write for pay. I
QA / R&D Team Mobile Devices \ wanted to be paid for what I write."
SUSE LINUX Products GmbH, Nürnberg \ -- Leonard Cohen
next prev parent reply other threads:[~2006-09-30 11:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-28 2:50 [PATCH] preserve correct battery state through suspend/resume cycles Jiri Kosina
2006-09-30 11:48 ` Stefan Seyfried [this message]
2006-10-08 18:42 ` Pavel Machek
2006-10-09 22:52 ` Rafael J. Wysocki
2006-10-10 10:50 ` Pavel Machek
2006-10-10 12:10 ` Stefan Seyfried
2006-10-10 12:37 ` Rafael J. Wysocki
2006-10-10 16:39 ` Pavel Machek
2006-10-06 21:43 ` Pavel Machek
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=20060930114817.GA26217@suse.de \
--to=seife@suse.de \
--cc=akpm@osdl.org \
--cc=jikos@jikos.cz \
--cc=len.brown@intel.com \
--cc=linux-acpi@intel.com \
--cc=linux-kernel@vger.kernel.org \
/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