diff options
| author | Linux Build Service Account <lnxbuild@quicinc.com> | 2017-11-05 22:32:43 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-11-05 22:32:43 -0800 |
| commit | 67dcc348d7eb50c1260a2b951a89af2c0fb4dfbe (patch) | |
| tree | e5f4fde8ae3fd05de4bcb97550609b1fe19d8821 | |
| parent | c6846de733113efb533dd52e2ceb7e3120c8a2f7 (diff) | |
| parent | 703b54ebc488a9c008e91ff6286d68e38cf92336 (diff) | |
Merge "leds: qpnp-wled: Disable module permanently when OVP fault persists"
| -rw-r--r-- | drivers/leds/leds-qpnp-wled.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/leds/leds-qpnp-wled.c b/drivers/leds/leds-qpnp-wled.c index c422b9e09c54..b8e16088455f 100644 --- a/drivers/leds/leds-qpnp-wled.c +++ b/drivers/leds/leds-qpnp-wled.c @@ -402,6 +402,7 @@ struct qpnp_wled { bool ovp_irq_disabled; bool auto_calib_enabled; bool auto_calib_done; + bool module_dis_perm; ktime_t start_ovp_fault_time; }; @@ -598,6 +599,9 @@ static int qpnp_wled_module_en(struct qpnp_wled *wled, { int rc; + if (wled->module_dis_perm) + return 0; + rc = qpnp_wled_masked_write_reg(wled, QPNP_WLED_MODULE_EN_REG(base_addr), QPNP_WLED_MODULE_EN_MASK, @@ -1215,6 +1219,7 @@ static int wled_auto_calibrate(struct qpnp_wled *wled) if (!sink_config) { pr_warn("No valid WLED sinks found\n"); + wled->module_dis_perm = true; goto failed_calib; } |
