power: pm8921-bms: enable/disable FCC learning feature

There are some configurations which do not want battery full charge
capacity (FCC) learning.

Provide means to enable/disable the FCC learning feature.

Change-Id: Icf6ec2fac867d62c3c1eeb882d66d57523312b5b
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
diff --git a/drivers/power/pm8921-bms.c b/drivers/power/pm8921-bms.c
index 90f48f4..f8135dc 100644
--- a/drivers/power/pm8921-bms.c
+++ b/drivers/power/pm8921-bms.c
@@ -135,6 +135,7 @@
 	int			last_cc_uah; /* used for Iavg calc for UUC */
 	struct timeval		t;
 	int			last_uuc_uah;
+	int			enable_fcc_learning;
 };
 
 static struct pm8921_bms_chip *the_chip;
@@ -1820,7 +1821,7 @@
 
 	bms_end_ocv_uv = raw.last_good_ocv_uv;
 
-	if (is_battery_full
+	if (is_battery_full && the_chip->enable_fcc_learning
 		&& the_chip->start_percent <= MIN_START_PERCENT_FOR_LEARNING) {
 		int fcc_uah, new_fcc_uah, delta_fcc_uah;
 
@@ -2587,6 +2588,7 @@
 	chip->ref1p25v_channel = pdata->bms_cdata.ref1p25v_channel;
 	chip->batt_id_channel = pdata->bms_cdata.batt_id_channel;
 	chip->revision = pm8xxx_get_revision(chip->dev->parent);
+	chip->enable_fcc_learning = pdata->enable_fcc_learning;
 	INIT_WORK(&chip->calib_hkadc_work, calibrate_hkadc_work);
 
 	rc = request_irqs(chip, pdev);