power: qpnp-fg: Fix Rslow charger compensation workaround
Currently, the default Rslow compensation values are read from FG SRAM
where the data will be retained during reboot if the profile is not
loaded again. If device reboots after Rslow compensation values are
modified, the modified values will be read as the default values in
the boot up which is not expected.
Hence, change reading the default Rslow compensation values from battery
profile instead of from FG SRAM. The default Rslow compensation values
are part of the battery profile and they are written into FG SRAM when
programming the battery profile, so reading them from battery profile
is correct and this makes the driver would always get the correct
default values.
Also, clear the Rslow charger compensation in shutdown() callback, and
trigger the Rslow charger compensation check immediately whenever the
charger is inserted or removed and active flag is clear or set.
CRs-Fixed: 2076453
Change-Id: I5180df615f6a60ba4709b1b3f5e16cdd9ddd3456
Signed-off-by:
Fenglin Wu <fenglinw@codeaurora.org>
Loading
Please register or sign in to comment