Loading drivers/power/qpnp-charger.c +26 −2 Original line number Diff line number Diff line Loading @@ -1279,6 +1279,21 @@ qpnp_chg_vddmax_and_trim_set(struct qpnp_chg_chip *chip, return 0; } static int qpnp_chg_vddmax_get(struct qpnp_chg_chip *chip) { int rc; u8 vddmax = 0; rc = qpnp_chg_read(chip, &vddmax, chip->chgr_base + CHGR_VDD_MAX, 1); if (rc) { pr_err("Failed to write vddmax: %d\n", rc); return rc; } return QPNP_CHG_V_MIN_MV + (int)vddmax * QPNP_CHG_V_STEP_MV; } /* JEITA compliance logic */ static void qpnp_chg_set_appropriate_vddmax(struct qpnp_chg_chip *chip) Loading Loading @@ -2071,6 +2086,8 @@ get_prop_capacity(struct qpnp_chg_chip *chip) if (battery_status != POWER_SUPPLY_STATUS_CHARGING && bms_status != POWER_SUPPLY_STATUS_CHARGING && charger_in && !chip->bat_is_cool && !chip->bat_is_warm && !chip->resuming_charging && !chip->charging_disabled && chip->soc_resume_limit Loading Loading @@ -3088,10 +3105,17 @@ qpnp_eoc_work(struct work_struct *work) count = 0; } else { if (count == CONSECUTIVE_COUNT) { if (!chip->bat_is_cool && !chip->bat_is_warm) { pr_info("End of Charging\n"); chip->chg_done = true; } else { pr_info("stop charging: battery is %s, vddmax = %d reached\n", chip->bat_is_cool ? "cool" : "warm", qpnp_chg_vddmax_get(chip)); } chip->delta_vddmax_mv = 0; qpnp_chg_set_appropriate_vddmax(chip); chip->chg_done = true; qpnp_chg_charge_en(chip, 0); /* sleep for a second before enabling */ msleep(2000); Loading Loading
drivers/power/qpnp-charger.c +26 −2 Original line number Diff line number Diff line Loading @@ -1279,6 +1279,21 @@ qpnp_chg_vddmax_and_trim_set(struct qpnp_chg_chip *chip, return 0; } static int qpnp_chg_vddmax_get(struct qpnp_chg_chip *chip) { int rc; u8 vddmax = 0; rc = qpnp_chg_read(chip, &vddmax, chip->chgr_base + CHGR_VDD_MAX, 1); if (rc) { pr_err("Failed to write vddmax: %d\n", rc); return rc; } return QPNP_CHG_V_MIN_MV + (int)vddmax * QPNP_CHG_V_STEP_MV; } /* JEITA compliance logic */ static void qpnp_chg_set_appropriate_vddmax(struct qpnp_chg_chip *chip) Loading Loading @@ -2071,6 +2086,8 @@ get_prop_capacity(struct qpnp_chg_chip *chip) if (battery_status != POWER_SUPPLY_STATUS_CHARGING && bms_status != POWER_SUPPLY_STATUS_CHARGING && charger_in && !chip->bat_is_cool && !chip->bat_is_warm && !chip->resuming_charging && !chip->charging_disabled && chip->soc_resume_limit Loading Loading @@ -3088,10 +3105,17 @@ qpnp_eoc_work(struct work_struct *work) count = 0; } else { if (count == CONSECUTIVE_COUNT) { if (!chip->bat_is_cool && !chip->bat_is_warm) { pr_info("End of Charging\n"); chip->chg_done = true; } else { pr_info("stop charging: battery is %s, vddmax = %d reached\n", chip->bat_is_cool ? "cool" : "warm", qpnp_chg_vddmax_get(chip)); } chip->delta_vddmax_mv = 0; qpnp_chg_set_appropriate_vddmax(chip); chip->chg_done = true; qpnp_chg_charge_en(chip, 0); /* sleep for a second before enabling */ msleep(2000); Loading