power: bcl_peripheral: Update the bcl interrupt to be threaded
Update the BCL interrupt to be threaded. There can
be a case where the BCL interrupt gets disabled in
interrupt service routine and in the same time the
BCL monitoring is disabled via sysfs. During this
case, the sysfs monitor disable API also tries to
disable the already disabled interrupt, which causes
a disable depth count of two. This requires two enable
to happen. In current BCL implementation the two enable
cannot happen to recover the BCL monitoring back,
leaving the system unprotected from BCL events till
next reboot.
Update the BCL interrupt to be threaded, so that the
state change can be protected via mutex. All the interrupt
disable/enable are now protected via mutex, which also
checks for the current state of the state machine
before enabling/disabling. After checking the state the
API will take care of not enabling/disabling the
interrupt multiple times.
CRs-Fixed: 794174
Change-Id: I1facae95d74f5b4139ea1646779cb1116d98be97
Signed-off-by:
Ram Chandrasekar <rkumbako@codeaurora.org>
Loading
Please register or sign in to comment