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

Commit 069bda85 authored by Vamshi Krishna B V's avatar Vamshi Krishna B V Committed by Subbaraman Narayanamurthy
Browse files

power_supply: Add SOH, ESR_Actual and ESR_Nominal properties



Add State of Health (SOH) property which indicates battery state
of health based on ESR and learned capacity.
Also add ESR_Actual and ESR_Nominal for SOH calculations.

CRs-Fixed: 2259538
Change-Id: Icefa262627296b5dc232ea706a8253cb854288b6
Signed-off-by: default avatarVamshi Krishna B V <vbv@codeaurora.org>
Signed-off-by: default avatarSubbaraman Narayanamurthy <subbaram@codeaurora.org>
parent b8fbbafb
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -369,6 +369,9 @@ static struct device_attribute power_supply_attrs[] = {
	POWER_SUPPLY_ATTR(recharge_soc),
	POWER_SUPPLY_ATTR(hvdcp_opti_allowed),
	POWER_SUPPLY_ATTR(smb_en_mode),
	POWER_SUPPLY_ATTR(esr_actual),
	POWER_SUPPLY_ATTR(esr_nominal),
	POWER_SUPPLY_ATTR(soh),
	/* Local extensions of type int64_t */
	POWER_SUPPLY_ATTR(charge_counter_ext),
	/* Properties of type `const char *' */
+3 −0
Original line number Diff line number Diff line
@@ -295,6 +295,9 @@ enum power_supply_property {
	POWER_SUPPLY_PROP_RECHARGE_SOC,
	POWER_SUPPLY_PROP_HVDCP_OPTI_ALLOWED,
	POWER_SUPPLY_PROP_SMB_EN_MODE,
	POWER_SUPPLY_PROP_ESR_ACTUAL,
	POWER_SUPPLY_PROP_ESR_NOMINAL,
	POWER_SUPPLY_PROP_SOH,
	/* Local extensions of type int64_t */
	POWER_SUPPLY_PROP_CHARGE_COUNTER_EXT,
	/* Properties of type `const char *' */