From: Alexey Starikovskiy <aystarik@gmail.com>
To: Andrey Borzenkov <arvidjaar@mail.ru>
Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
"Rafael J. Wysocki" <rjw@sisk.pl>
Subject: Re: [2.6.24-rc1 regression] AC adapter state does not change after resume
Date: Wed, 31 Oct 2007 00:09:32 +0300 [thread overview]
Message-ID: <47279D8C.5040708@gmail.com> (raw)
In-Reply-To: <200710302324.52822.arvidjaar@mail.ru>
[-- Attachment #1: Type: text/plain, Size: 303 bytes --]
Andrey Borzenkov wrote:
> I suspect new ACPI AC adapter code but have to add some printk's to be sure.
>
> To reproduce - plug in AC cord, suspend, unplug, resume - kpowersave and sysfs
> still show AC adapter online. Or other way round.
>
> -andrey
Please check if this patch helps.
Regards,
Alex.
[-- Attachment #2: update_ac_state_on_sysfs_read.patch --]
[-- Type: text/x-diff, Size: 642 bytes --]
ACPI: AC: Update AC state on sysfs read
From: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
---
drivers/acpi/ac.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c
index e03de37..bb618c8 100644
--- a/drivers/acpi/ac.c
+++ b/drivers/acpi/ac.c
@@ -91,6 +91,9 @@ static int get_ac_property(struct power_supply *psy,
union power_supply_propval *val)
{
struct acpi_ac *ac = to_acpi_ac(psy);
+
+ if (acpi_ac_get_state(ac))
+ return 0;
switch (psp) {
case POWER_SUPPLY_PROP_ONLINE:
val->intval = ac->state;
next prev parent reply other threads:[~2007-10-30 21:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-30 20:24 [2.6.24-rc1 regression] AC adapter state does not change after resume Andrey Borzenkov
2007-10-30 20:36 ` Alexey Starikovskiy
2007-10-30 21:09 ` Alexey Starikovskiy [this message]
2007-10-31 4:09 ` Andrey Borzenkov
2007-10-31 6:27 ` Alexey Starikovskiy
2007-11-01 18:44 ` Andrey Borzenkov
2007-10-30 21:24 ` Rafael J. Wysocki
2007-10-31 4:20 ` Andrey Borzenkov
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=47279D8C.5040708@gmail.com \
--to=aystarik@gmail.com \
--cc=arvidjaar@mail.ru \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.