mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
Currently, auto calibration logic checks only for OVP_FAULT bit to be set in FAULT_STATUS register to detect OVP fault. This works well for WLED4 type. However, WLED5 type has OVP_PRE_ALARM bit which can indicate a potential OVP fault. Use that as well for detecting OVP fault and run auto calibration to fix the sink configuration. While at it, add a common function to get the OVP fault status for both WLED4 and WLED5 types. Also, disable WLED module if OVP fault interrupt fires once the auto calibration is done to prevent a possible hardware damage. Change-Id: I4c815f982e4641aa0b351d0d26ccf888a6dda070 Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>