Subbaraman Narayanamurthy 21e682621f qcom: spmi-wled: Fix auto calibration support for WLED5
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>
2018-04-04 14:52:20 -07:00
..
2018-03-25 10:58:08 +02:00