power: pm8921-bms: provide option to ignore shutdown soc

Few platforms do not want to use the shutdown soc. Provide a option to
selectively disable it.

Change-Id: Ie57d474f4e81e4ce2e7e7a4a92cda20d4c8dd184
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
diff --git a/drivers/power/pm8921-bms.c b/drivers/power/pm8921-bms.c
index b69ad11..af003b0 100644
--- a/drivers/power/pm8921-bms.c
+++ b/drivers/power/pm8921-bms.c
@@ -134,6 +134,7 @@
 	struct delayed_work	calculate_soc_delayed_work;
 	struct timespec		t_soc_queried;
 	int			shutdown_soc_valid_limit;
+	int			ignore_shutdown_soc;
 };
 
 /*
@@ -1512,6 +1513,9 @@
 	else
 		chip->shutdown_soc = temp;
 
+	if (chip->ignore_shutdown_soc)
+		chip->shutdown_soc = 0;
+
 	pr_debug("shutdown_soc = %d\n", chip->shutdown_soc);
 }
 
@@ -2949,6 +2953,7 @@
 	chip->start_percent = -EINVAL;
 	chip->end_percent = -EINVAL;
 	chip->shutdown_soc_valid_limit = pdata->shutdown_soc_valid_limit;
+	chip->ignore_shutdown_soc = pdata->ignore_shutdown_soc;
 	rc = set_battery_data(chip);
 	if (rc) {
 		pr_err("%s bad battery data %d\n", __func__, rc);