power: max17048: display correct status at boot-up
Syed Rafiuddin [Fri, 1 Feb 2013 09:59:05 +0000 (14:59 +0530)]
disply proper charging status when booted up without
any charger cable connected

Change-Id: I18bd7702a62923a4f7675ea392be180f2ed03d7c
Signed-off-by: Syed Rafiuddin <srafiuddin@nvidia.com>
Reviewed-on: http://git-master/r/196368
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

drivers/power/max17048_battery.c

index ab7aee8..69e10b9 100644 (file)
@@ -507,6 +507,7 @@ static int __devinit max17048_probe(struct i2c_client *client,
        chip->battery.get_property      = max17048_get_property;
        chip->battery.properties        = max17048_battery_props;
        chip->battery.num_properties    = ARRAY_SIZE(max17048_battery_props);
+       chip->status                    = POWER_SUPPLY_STATUS_DISCHARGING;
 
        ret = power_supply_register(&client->dev, &chip->battery);
        if (ret) {