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>
This commit is contained in:
parent
9ba5d5b815
commit
42bcb67fbc
1 changed files with 2 additions and 2 deletions
|
@ -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
|
* 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
|
* it under the terms of the GNU General Public License version 2 and
|
||||||
|
@ -1644,7 +1644,7 @@ turn_off:
|
||||||
goto exit_flash_led_work;
|
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,
|
rc = qpnp_led_masked_write(led,
|
||||||
|
|
Loading…
Add table
Reference in a new issue