From: NeilBrown <neilb@suse.de>
To: Sebastian Reichel <sre@kernel.org>,
Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
David Woodhouse <dwmw2@infradead.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
Zhang Rui <rui.zhang@intel.com>,
GTA04 owners <gta04-owner@goldelico.com>
Subject: [PATCH] bq27x00_battery: register as non-wakeup power supply.
Date: Tue, 24 Feb 2015 14:17:32 +1100 [thread overview]
Message-ID: <20150224141732.5c937402@notabene.brown> (raw)
[-- Attachment #1: Type: text/plain, Size: 1008 bytes --]
power_supply status changes for the bq27x00 are only
noticed via polling, not via interrupts. So they are never
the source of events which should reliably wake the system
from suspend.
So it is appropriate to register as a no_ws power source,
just like the ACPI battery.
This removes some debugging messages which occasionally
confusingly identify bq27x00 as a wakeup source.
Signed-off-by: NeilBrown <neilb@suse.de>
diff --git a/drivers/power/bq27x00_battery.c b/drivers/power/bq27x00_battery.c
index b72ba7c1bd69..93d2b7f910f1 100644
--- a/drivers/power/bq27x00_battery.c
+++ b/drivers/power/bq27x00_battery.c
@@ -755,7 +755,7 @@ static int bq27x00_powersupply_init(struct bq27x00_device_info *di)
INIT_DELAYED_WORK(&di->work, bq27x00_battery_poll);
mutex_init(&di->lock);
- ret = power_supply_register(di->dev, &di->bat);
+ ret = power_supply_register_no_ws(di->dev, &di->bat);
if (ret) {
dev_err(di->dev, "failed to register battery: %d\n", ret);
return ret;
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]
next reply other threads:[~2015-02-24 3:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-24 3:17 NeilBrown [this message]
2015-02-25 20:37 ` [PATCH] bq27x00_battery: register as non-wakeup power supply Sebastian Reichel
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=20150224141732.5c937402@notabene.brown \
--to=neilb@suse.de \
--cc=dbaryshkov@gmail.com \
--cc=dwmw2@infradead.org \
--cc=gta04-owner@goldelico.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=rui.zhang@intel.com \
--cc=sre@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 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.