summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun Zhang <chunz@codeaurora.org>2016-01-13 18:08:46 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 21:23:51 -0700
commit42bcb67fbc982efae2e77c1c3662c12f6fbec5e6 (patch)
treeb70fd68519c781d90431337517123f38a5aae5a8
parent9ba5d5b8152f320052dd6f9cae6ecb33ed7888e7 (diff)
leds: leds-qpnp-flash: set open circuit fault flag when detected
The open fault status flag depends on fault status register. However, the register value is reset when LED module is disabled. In this case, use OR logic to make sure the value is always set even if module gets disabled. Change-Id: If89f8fca25abc79d9d200d59031b8654f812105d Signed-off-by: Chun Zhang <chunz@codeaurora.org>
-rw-r--r--drivers/leds/leds-qpnp-flash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/leds/leds-qpnp-flash.c b/drivers/leds/leds-qpnp-flash.c
index 3eb794b30b4b..77c7bb89189f 100644
--- a/drivers/leds/leds-qpnp-flash.c
+++ b/drivers/leds/leds-qpnp-flash.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -1644,7 +1644,7 @@ turn_off:
goto exit_flash_led_work;
}
- led->open_fault = (temp & FLASH_LED_OPEN_FAULT_DETECTED);
+ led->open_fault |= (val & FLASH_LED_OPEN_FAULT_DETECTED);
}
rc = qpnp_led_masked_write(led,