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

Commit 6b5632e4 authored by Vamshi Krishna B V's avatar Vamshi Krishna B V
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>
parent 485ad23c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -335,6 +335,9 @@ static struct device_attribute power_supply_attrs[] = {
	POWER_SUPPLY_ATTR(battery_info),
	POWER_SUPPLY_ATTR(battery_info_id),
	POWER_SUPPLY_ATTR(enable_jeita_detection),
	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
@@ -286,6 +286,9 @@ enum power_supply_property {
	POWER_SUPPLY_PROP_BATTERY_INFO,
	POWER_SUPPLY_PROP_BATTERY_INFO_ID,
	POWER_SUPPLY_PROP_ENABLE_JEITA_DETECTION,
	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 *' */