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

Commit 5e6ca24e 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-smbcharger: qpnp-fg: use PROP_STATUS for SOC adjustment"

parents fc31d920 1557249e
Loading
Loading
Loading
Loading
+2 −9
Original line number Diff line number Diff line
@@ -1403,7 +1403,6 @@ static enum power_supply_property fg_power_props[] = {
	POWER_SUPPLY_PROP_RESISTANCE_ID,
	POWER_SUPPLY_PROP_BATTERY_TYPE,
	POWER_SUPPLY_PROP_UPDATE_NOW,
	POWER_SUPPLY_PROP_CHARGE_FULL,
	POWER_SUPPLY_PROP_ESR_COUNT,
};

@@ -1453,12 +1452,6 @@ static int fg_power_get_property(struct power_supply *psy,
	case POWER_SUPPLY_PROP_UPDATE_NOW:
		val->intval = 0;
		break;
	case POWER_SUPPLY_PROP_CHARGE_FULL:
		if (get_prop_capacity(chip) == 100)
			val->intval = 1;
		else
			val->intval = 0;
		break;
	default:
		return -EINVAL;
	}
@@ -1484,8 +1477,8 @@ static int fg_power_set_property(struct power_supply *psy,
		if (val->intval)
			update_sram_data(chip, &unused);
		break;
	case POWER_SUPPLY_PROP_CHARGE_FULL:
		if (val->intval)
	case POWER_SUPPLY_PROP_STATUS:
		if (val->intval == POWER_SUPPLY_STATUS_FULL)
			rc = fg_configure_soc(chip);
		break;
	default:
+2 −1
Original line number Diff line number Diff line
@@ -763,7 +763,8 @@ static void smbchg_check_and_notify_fg_soc(struct smbchg_chip *chip)
		&& get_prop_batt_status(chip)
			== POWER_SUPPLY_STATUS_CHARGING) {
		pr_smb(PR_STATUS, "Adjusting battery soc in FG\n");
		set_property_on_fg(chip, POWER_SUPPLY_PROP_CHARGE_FULL, 1);
		set_property_on_fg(chip, POWER_SUPPLY_PROP_STATUS,
				POWER_SUPPLY_STATUS_FULL);
	}
}