public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bq27x00_battery: register as non-wakeup power supply.
@ 2015-02-24  3:17 NeilBrown
  2015-02-25 20:37 ` Sebastian Reichel
  0 siblings, 1 reply; 2+ messages in thread
From: NeilBrown @ 2015-02-24  3:17 UTC (permalink / raw)
  To: Sebastian Reichel, Dmitry Eremin-Solenikov, David Woodhouse,
	Rafael J. Wysocki
  Cc: linux-pm, linux-kernel, Zhang Rui, GTA04 owners

[-- 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 --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] bq27x00_battery: register as non-wakeup power supply.
  2015-02-24  3:17 [PATCH] bq27x00_battery: register as non-wakeup power supply NeilBrown
@ 2015-02-25 20:37 ` Sebastian Reichel
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Reichel @ 2015-02-25 20:37 UTC (permalink / raw)
  To: NeilBrown
  Cc: Dmitry Eremin-Solenikov, David Woodhouse, Rafael J. Wysocki,
	linux-pm, linux-kernel, Zhang Rui, GTA04 owners

[-- Attachment #1: Type: text/plain, Size: 566 bytes --]

Hi,

On Tue, Feb 24, 2015 at 02:17:32PM +1100, NeilBrown wrote:
> 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>

pulled into battery-2.6.git.

-- Sebastian

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-25 20:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-24  3:17 [PATCH] bq27x00_battery: register as non-wakeup power supply NeilBrown
2015-02-25 20:37 ` Sebastian Reichel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox