power: qpnp-fg: validate temperature reading
When the FG algorithm is stuck, the temperature read from SRAM
may be incorrect. To handle this scenario, validate the
temperature read from SRAM with the specified limits before
updating power supply property. Without this, userspace will get
a false alarm of extreme battery temperature and initiates a
shutdown immediately. Default battery temperature low and high
limits are -60C and 150C respectively.
Battery temperature limits can be configured through the
following device tree properties.
- qcom,fg-batt-temp-low-limit
- qcom,fg-batt-temp-high-limit
CRs-Fixed: 962694
Change-Id: Iba0acd3f08bb6aa8f9a54ce2215acb849c9bc2b5
Signed-off-by:
Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Loading
Please register or sign in to comment