power: pm8921-bms: force max_voltage at end of charge

When an end of charge with a full battery happens, the bms driver
fakes max ocv and zero cc. To force max ocv the driver currently
assumes that the first row last column will have the highest profiled
voltage. This may not be true always.

Pass the maximum voltage from platform data and use that to force
max ocv.

Change-Id: I29c71a20648fb2f9066f2f82e14a6080692c63fd
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-8960-pmic.c b/arch/arm/mach-msm/board-8960-pmic.c
index 5e1ea0d..c5d47f4 100644
--- a/arch/arm/mach-msm/board-8960-pmic.c
+++ b/arch/arm/mach-msm/board-8960-pmic.c
@@ -403,10 +403,11 @@
 	325,
 };
 
+#define MAX_VOLTAGE_MV		4200
 static struct pm8921_charger_platform_data pm8921_chg_pdata __devinitdata = {
 	.safety_time		= 180,
 	.update_time		= 60000,
-	.max_voltage		= 4200,
+	.max_voltage		= MAX_VOLTAGE_MV,
 	.min_voltage		= 3200,
 	.resume_voltage_delta	= 100,
 	.term_current		= 100,
@@ -431,6 +432,7 @@
 	.i_test			= 2500,
 	.v_failure		= 3000,
 	.calib_delay_ms		= 600000,
+	.max_voltage_uv		= MAX_VOLTAGE_MV * 1000,
 };
 
 #define	PM8921_LC_LED_MAX_CURRENT	4	/* I = 4mA */