summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--driver/battery/bq27541.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/driver/battery/bq27541.c b/driver/battery/bq27541.c
index e1d7ad2c4e..b39147092f 100644
--- a/driver/battery/bq27541.c
+++ b/driver/battery/bq27541.c
@@ -317,6 +317,10 @@ void battery_get_params(struct batt_params *batt)
batt->is_present = BP_NO;
}
+ /* update the battery status */
+ if (battery_status(&batt->status))
+ batt->flags |= BATT_FLAG_BAD_STATUS;
+
v = 0;
if (battery_charging_allowed(&v)) {
batt->flags |= BATT_FLAG_BAD_ANY;