power: tps80031-battery: enable battery full event
Xin Xie [Thu, 12 Jul 2012 22:17:37 +0000 (15:17 -0700)]
BUG 1015045

Change-Id: Id9ac783365f08787638edc057d55f29c9a0e46eb
Signed-off-by: Xin Xie <xxie@nvidia.com>
Reviewed-on: http://git-master/r/122310
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

drivers/power/tps80031_battery_gauge.c

index 69bad9c..f339b41 100644 (file)
@@ -433,6 +433,8 @@ void tps80031_battery_status(enum charging_states status, void *data)
                di->usb_status = POWER_SUPPLY_STATUS_DISCHARGING;
                di->ac_online = 0;
                di->usb_online = 0;
+       } else if (status == charging_state_charging_completed) {
+               di->usb_status = POWER_SUPPLY_STATUS_FULL;
        }
        power_supply_changed(&di->usb);
        power_supply_changed(&di->bat);