Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f6fd796 authored by Ram Chandrasekar's avatar Ram Chandrasekar Committed by Shiju Mathew
Browse files

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: default avatarRam Chandrasekar <rkumbako@codeaurora.org>
parent 4eef3781
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment