regulator: qpnp-lcdb: fix race between SC interrupt and lcdb enable

During the handling of a SC interrupt, in the handler API, the LCDB
module is disabled and reenabled. During the reenablement, it is
possible that another SC interrupt may be triggered and it reads a
status indicating SC before enabling is complete, which would lead to
the handler API being called again.
Fix this by reading the status register in SC interrupt handler in
the same mutex used by the handler API, which is released only after
LCDB enable is complete, which can help to avoid this issue.

Change-Id: I72505f53a489e7e79e68f28aa581e5a25dffbfa8
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
1 file changed