mfd: tps80031: fix wrong regmap for charger
Xin Xie [Fri, 3 Aug 2012 01:28:48 +0000 (18:28 -0700)]
BUG 1026050

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

drivers/mfd/tps80031.c
drivers/power/tps80031-charger.c

index e8a00a8..f524b29 100644 (file)
 #define TPS80031_ID2_PWM                       0xBA ... 0xBE
 #define TPS80031_ID2_FUEL_GAUSE                        0xC0 ... 0xCB
 #define TPS80031_ID2_INTERFACE_INTERRUPTS      0xD0 ... 0xD8
-#define TPS80031_ID2_CHARGER                   0xE0 ... 0xF5
+#define TPS80031_ID2_CHARGER                   0xDA ... 0xF5
 
 #define TPS80031_ID3_TEST_LDO                  0x00 ... 0x09
 #define TPS80031_ID3_TEST_SMPS                 0x10 ... 0x2B
index 123c4a3..70a3657 100644 (file)
@@ -269,7 +269,8 @@ static int configure_charging_parameter(struct tps80031_charger *charger)
        }
 
        /* set Pre Charge current to 400mA */
-       ret = tps80031_write(charger->dev->parent, SLAVE_ID2, 0xDE, 0x3);
+       ret = tps80031_write(charger->dev->parent, SLAVE_ID2,
+                       CHARGERUSB_VICHRG_PC, 0x3);
        if (ret < 0) {
                dev_err(charger->dev, "%s(): Failed in writing register 0x%02x\n",
                                __func__, 0xDD);