power: qpnp-fg: add fuel gauge SRAM interface
The PMI8994 Fuel Gauge has a SRAM interface exposed
via the FG_MEMIF PMIC pheripheral.
A given memory access must first request permission
to read or write to SRAM. This will stop the
fuel gauge's statemachine. The time taken for
a memory access to be granted is up to 1.5 seconds.
Once a memory access has been granted the mem-avail
interrupt is triggered and the memory access can
proceed by configuring the offset within SRAM and
continuing to read or write to the relevant SPMI
buffer registers.
Once a transaction is complete the memory access
request has to be removed to allow the fuel gauge
to continue.
Various configurations are exposed in SRAM such as
the JEITA temperature thresholds. Add support
for the four temperature thresholds to be configured
at boot time and run time through the power supply
framework.
Change-Id: Ic72a9f0dba7fa9fc752f3e34ee49355b7b01513d
Signed-off-by:
David Keitel <dkeitel@codeaurora.org>
Loading
Please register or sign in to comment