power: qpnp-fg: add support to sanity check FG state
There may be instances where FG can be locked up without really
acquiring IMA access. In these cases, IMA transactions from SW
can still go through and SRAM values will never be updated.
Add support to do a sanity check of FG algorithm by checking the
beat count every 5 seconds. The beat count is updated twice
during a FG cycle of 1.47 seconds. If that doesn't get updated,
then it is a potential lockup. Trigger the IMA error recovery
sequence in the aforementioned scenario.
CRs-Fixed: 962694
Change-Id: Ie31f22390ad4f1b23dd4f2c9b6721b83bc475f56
Signed-off-by:
Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Loading
Please register or sign in to comment