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

Skip to content
Commit 8a1c1bab authored by Guru Das Srinagesh's avatar Guru Das Srinagesh
Browse files

power: smb5: Announce DCIN AICL done via PSY property



Add support for exposing whether or not DCIN AICL process has finished
executing via the DC PSY property AICL_DONE.

AICL is declared as done if there are no error conditions encountered
while doing the work. AICL status is set to not done when DC PSY is
detached, both from the DC plugin handler as well as after determining
DCIN AICL has hit max.  The latter case is to address the following edge
case scenario:

1. DCIN AICL work completes normally due to hitting max ICL
2. WLS voltage is decremented after being first incremented by
   userspace.
3. DCIN AICL rerun is triggered in 5 sec as a result of the voltage
   decrement. (The adaptor is still healthy and so ICL remains still at
   max.)
4. WLS detach occurs before expiry of 500 ms in the work, so even though
   DC plugin detach path clears AICL done, the DCIN AICL work re-sets it
   to done after waking up from the 500 ms sleep.

While at it, change criteria for decrementing DCIN ICL from exact
equality to a minimum check. This will make the logic more robust to any
DCIN UV storms. Also remove stale comment.

Change-Id: I787705ecb874356aa475bb98e6b596a020cc548e
Signed-off-by: default avatarGuru Das Srinagesh <gurus@codeaurora.org>
parent e24a3925
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment