summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenny Ho <hsiufangho@google.com>2023-08-31 10:15:28 +0800
committerJenny Ho <hsiufangho@google.com>2023-08-31 10:23:31 +0800
commit6dba90075d71778bcbb6f9ab65d972f64424d10d (patch)
treeba54f67bd55ba4069b38767411c52085ffdd84fe
parent60848a7ad88da96524f6850a6fb9cd7b2cdbe012 (diff)
downloadbms-6dba90075d71778bcbb6f9ab65d972f64424d10d.tar.gz
resume not completed causing read of FG register via i2c to fail, in this case keep running next work queue Bug: 297982507 Change-Id: I4847eabec5e367d699fc179d160ca3f304703ee8 Signed-off-by: Jenny Ho <hsiufangho@google.com>
-rw-r--r--max1720x_battery.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/max1720x_battery.c b/max1720x_battery.c
index 6105bd7..11210a5 100644
--- a/max1720x_battery.c
+++ b/max1720x_battery.c
@@ -4493,13 +4493,13 @@ static void max1720x_rc_work(struct work_struct *work)
int interval = RC_WORK_TIME_MS;
u16 data, learncfg;
bool to_rc1, to_rc2;
- int ret, soc, temp;
+ int ret = 0, soc, temp;
if (!chip->rc_switch.available || !chip->rc_switch.enable)
return;
- if (chip->por)
- return;
+ if (chip->por || !chip->resume_complete)
+ goto reschedule;
/* Read SOC */
ret = REGMAP_READ(&chip->regmap, MAX_M5_REPSOC, &data);