leds: qpnp-wled: Disable module permanently when OVP fault persists
Currently, auto calibration will be invoked if an OVP fault is triggered because of an incorrect sink configuration. However, there are certain hardware platforms where the display panel is not used. It is hard to differentiate such platforms as they will be using the same device tree configuration or parameters related to display panel passed through the bootloader. Disable the module permanently and also keep the OVP fault interrupt disabled when a valid sink configuration is not found by auto calibration. Change-Id: I302322020e8d6d4f92901dac468602c357967e18 Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
This commit is contained in:
parent
f24199bb12
commit
703b54ebc4
1 changed files with 5 additions and 0 deletions
|
@ -402,6 +402,7 @@ struct qpnp_wled {
|
||||||
bool ovp_irq_disabled;
|
bool ovp_irq_disabled;
|
||||||
bool auto_calib_enabled;
|
bool auto_calib_enabled;
|
||||||
bool auto_calib_done;
|
bool auto_calib_done;
|
||||||
|
bool module_dis_perm;
|
||||||
ktime_t start_ovp_fault_time;
|
ktime_t start_ovp_fault_time;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -598,6 +599,9 @@ static int qpnp_wled_module_en(struct qpnp_wled *wled,
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
if (wled->module_dis_perm)
|
||||||
|
return 0;
|
||||||
|
|
||||||
rc = qpnp_wled_masked_write_reg(wled,
|
rc = qpnp_wled_masked_write_reg(wled,
|
||||||
QPNP_WLED_MODULE_EN_REG(base_addr),
|
QPNP_WLED_MODULE_EN_REG(base_addr),
|
||||||
QPNP_WLED_MODULE_EN_MASK,
|
QPNP_WLED_MODULE_EN_MASK,
|
||||||
|
@ -1215,6 +1219,7 @@ static int wled_auto_calibrate(struct qpnp_wled *wled)
|
||||||
|
|
||||||
if (!sink_config) {
|
if (!sink_config) {
|
||||||
pr_warn("No valid WLED sinks found\n");
|
pr_warn("No valid WLED sinks found\n");
|
||||||
|
wled->module_dis_perm = true;
|
||||||
goto failed_calib;
|
goto failed_calib;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue