google_battery: vote sw_jeita when outside the charge table

Bug: 202370714
Signed-off-by: Jack Wu <[email protected]>
Change-Id: I5e5573e50a41a2f7eedc56169953cdda93adf7ce
diff --git a/google_battery.c b/google_battery.c
index 1a27b79..b54ab3d 100644
--- a/google_battery.c
+++ b/google_battery.c
@@ -2100,16 +2100,17 @@
 
 /*
  * software JEITA, disable charging when outside the charge table.
- * NOTE: ->jeita_stop_charging is either -1 (init or disable) or 0
+ * NOTE: ->jeita_stop_charging is either -1 (init or reset), 1 (disable) or 0
  * TODO: need to be able to disable (leave to HW)
  */
-static bool msc_logic_soft_jeita(const struct batt_drv *batt_drv, int temp)
+static bool msc_logic_soft_jeita(struct batt_drv *batt_drv, int temp)
 {
 	const struct gbms_chg_profile *profile = &batt_drv->chg_profile;
 
 	if (temp < profile->temp_limits[0] ||
 	    temp > profile->temp_limits[profile->temp_nb_limits - 1]) {
 		if (batt_drv->jeita_stop_charging < 0) {
+			batt_drv->jeita_stop_charging = 1;
 			batt_prlog(BATT_PRLOG_ALWAYS,
 				   "MSC_JEITA temp=%d off limits, do not enable charging\n",
 				   temp);