Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e54d9e8a authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "power: qpnp-linear-charger: update chg_done flag timely"

parents 11160fd4 a428f06b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -875,6 +875,12 @@ static int get_prop_capacity(struct qpnp_lbc_chip *chip)
		battery_status = get_prop_batt_status(chip);
		charger_in = qpnp_lbc_is_usb_chg_plugged_in(chip);

		/* reset chg_done flag if capacity not 100% */
		if (ret.intval < 100 && chip->chg_done) {
			chip->chg_done = false;
			power_supply_changed(&chip->batt_psy);
		}

		if (battery_status != POWER_SUPPLY_STATUS_CHARGING
				&& charger_in
				&& !chip->cfg_charging_disabled