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

Commit 5d82a81e authored by Subbaraman Narayanamurthy's avatar Subbaraman Narayanamurthy
Browse files

power: qpnp-fg: add support for restoring battery information



There is a requirement that if the same battery is removed and
inserted again, fuel gauge software should be able to restore the
battery state of charge (SOC) again. The implementation requires
that the userspace writes the stored battery information via
power supply properties battery_info_id and battery_info. Add
support for it.

Since the restoration should take place based on the specified
battery voltage or SOC limits, add the needed module parameters
(batt_valid_ocv, batt_range_pct) to support this requirement.

This feature itself is controlled by a device tree property
"qcom,fg-restore-batt-info".

CRs-Fixed: 1035402
Change-Id: Idf27dbb6a69f01f69e12c4e34cb4f4eb9c3f01e6
Signed-off-by: default avatarSubbaraman Narayanamurthy <subbaram@codeaurora.org>
parent 53160878
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -273,6 +273,14 @@ Parent node optional properties:
					default limit would be 150C.
- qcom,fg-cc-soc-limit-pct:		Percentage of CC_SOC before resetting
					FG and restore the full CC_SOC value.
- qcom,fg-restore-batt-info:		A boolean property to specify whether
					battery parameters needs to be
					restored. If this feature is enabled,
					then validating the battery parameters
					by OCV/battery SOC, validation range
					in percentage should be specified via
					appropriate module parameters to make
					it work properly.

qcom,fg-soc node required properties:
- reg : offset and length of the PMIC peripheral register map.
+481 −250

File changed.

Preview size limit exceeded, changes collapsed.