bq27x00_battery: Call power_supply_changed only when capacity changed
authorPuthikorn Voravootivat <puthik@chromium.org>
Wed, 22 Oct 2014 01:15:37 +0000 (18:15 -0700)
committerSebastian Reichel <sre@kernel.org>
Wed, 21 Jan 2015 19:03:31 +0000 (20:03 +0100)
commit90f04a28fbadbc179ee6325fd4ee7d5beb27bcf0
treec255eea21c048bd6d121cf80d73ce3f6c216f030
parent9dbf5a28642bb2db57fb5150252e133e19acd33a
bq27x00_battery: Call power_supply_changed only when capacity changed

In current driver, power_supply_changed() is called whenever any of
the battery attribute changed. This causes kernel to increases the
'/sys/power/wakeup_count' and make suspend not working correctly.

This patch change this behavior to call power_supply_changed()
only when the battery capacity changed.

Signed-off-by: Puthikorn Voravootivat <puthik@chromium.org>
Reviewed-by: David Riley <davidriley@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/bq27x00_battery.c