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

Commit 1c0ee441 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "power_supply: Add clear_soh property"

parents d7646c46 3931df4a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -381,6 +381,7 @@ static struct device_attribute power_supply_attrs[] = {
	POWER_SUPPLY_ATTR(esr_actual),
	POWER_SUPPLY_ATTR(esr_nominal),
	POWER_SUPPLY_ATTR(soh),
	POWER_SUPPLY_ATTR(clear_soh),
	POWER_SUPPLY_ATTR(force_recharge),
	POWER_SUPPLY_ATTR(fcc_stepper_enable),
	POWER_SUPPLY_ATTR(toggle_stat),
+5 −3
Original line number Diff line number Diff line
@@ -2908,9 +2908,8 @@ static void esr_calib_work(struct work_struct *work)
	 * to disable the interrupt OR ESR fast calibration timer is expired
	 * OR after one retry, disable ESR fast calibration.
	 */
	if ((chip->delta_esr_count >= chip->dt.delta_esr_disable_count) ||
		chip->esr_fast_cal_timer_expired ||
		(chip->esr_fast_calib_retry && chip->delta_esr_count > 0)) {
	if (chip->delta_esr_count >= chip->dt.delta_esr_disable_count ||
		chip->esr_fast_cal_timer_expired) {
		rc = fg_gen4_esr_fast_calib_config(chip, false);
		if (rc < 0)
			pr_err("Error in configuring esr_fast_calib, rc=%d\n",
@@ -3240,6 +3239,9 @@ static int fg_esr_fast_cal_sysfs(const char *val, const struct kernel_param *kp)
	if (!chip)
		return -ENODEV;

	if (fg_esr_fast_cal_en)
		chip->delta_esr_count = 0;

	rc = fg_gen4_esr_fast_calib_config(chip, fg_esr_fast_cal_en);
	if (rc < 0)
		return rc;
+1 −0
Original line number Diff line number Diff line
@@ -307,6 +307,7 @@ enum power_supply_property {
	POWER_SUPPLY_PROP_ESR_ACTUAL,
	POWER_SUPPLY_PROP_ESR_NOMINAL,
	POWER_SUPPLY_PROP_SOH,
	POWER_SUPPLY_PROP_CLEAR_SOH,
	POWER_SUPPLY_PROP_FORCE_RECHARGE,
	POWER_SUPPLY_PROP_FCC_STEPPER_ENABLE,
	POWER_SUPPLY_PROP_TOGGLE_STAT,