power: smb349: update correct charger status
Syed Rafiuddin [Wed, 25 Apr 2012 11:49:00 +0000 (16:49 +0530)]
Update correct status to fuel-gauge driver
when charger cable is disconnected.

Bug 960318

Change-Id: I4c3ad2030ada7c06825e80a3eb4697b669fe7cb6
Signed-off-by: Syed Rafiuddin <srafiuddin@nvidia.com>
Reviewed-on: http://git-master/r/98719
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

drivers/power/smb349-charger.c
include/linux/smb349-charger.h

index 22df2f9..6164905 100644 (file)
@@ -388,6 +388,7 @@ static int smb349_enable_charging(struct regulator_dev *rdev,
                                "charger..\n", __func__);
                        return ret;
                }
+               charger->chrg_type = NONE;
        } else {
                ret =  smb349_read(client, SMB349_STS_REG_D);
                if (ret < 0) {
index 19e7aa6..089f397 100644 (file)
@@ -45,6 +45,7 @@ enum charging_states {
 };
 
 enum charger_type {
+       NONE,
        AC,
        USB,
 };