diff options
-rw-r--r-- | max1720x_battery.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/max1720x_battery.c b/max1720x_battery.c index 63349e1..d27896e 100644 --- a/max1720x_battery.c +++ b/max1720x_battery.c @@ -1658,7 +1658,8 @@ static int max1720x_update_cycle_count(struct max1720x_chip *chip) return -ECANCELED; /* if cycle reg hasn't been restored from storage, restore it before update cycle count */ - if (!chip->cycle_reg_ok && max_m5_recal_state(chip->model_data) == RE_CAL_STATE_IDLE) { + if (!chip->cycle_reg_ok && chip->gauge_type == MAX_M5_GAUGE_TYPE && + max_m5_recal_state(chip->model_data) == RE_CAL_STATE_IDLE) { err = max1720x_restore_battery_cycle(chip); if (err < 0) dev_err(chip->dev, "%s cannot restore cycle count (%d)\n", __func__, err); |