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

Skip to content
Commit 08b714f8 authored by Abhijeet Dharmapurikar's avatar Abhijeet Dharmapurikar Committed by Stephen Boyd
Browse files

power: pm8921-charger: replace BTM with ADC algorithm



The battery temperature module has a bug where when it is disabled
during suspend and re-enabled during resume it locks up and cannot
accept anymore conversion requests.

When the BTM's End of Conversion (EOC) is complete the Request bit (REQ)
bit needs to go low. The bug prevents the REQ bit going low during a
scenario when the EOC bit is set and any of the banks on the
(USRP, SECP or MDM) is enabled.  When the next conversion request is
issued and if the REQ bit still remains high it renders the request
ineffective. The REQ bit goes low only when all the banks in the arbiter
is disabled. This cannot be guaranteed on the device and hence BTM
cannot be used.

Fix this by implementing a Jeita compliant check routine which
reads the battery temperature readings via the ADC and checks
the corresponding thersholds.

This is only done while charging is active. When the battery
temperature changes drastically while not charging the
BATT_TEMP_HOT/COLD interrupts.

Change-Id: Icef2b7fa70f274f671bd1b9469eb6a333ab462f9
Signed-off-by: default avatarAbhijeet Dharmapurikar <adharmap@codeaurora.org>
parent a0b954f8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment