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

Skip to content
Commit 9950bfe5 authored by Guru Das Srinagesh's avatar Guru Das Srinagesh
Browse files

power: smb1390: Wait for DCIN AICL completion to cast initial ILIM vote



WIRELESS_VOTER's job is to limit the maximum value of ILIM to the
maximum current capability of the DC PSY. This property of the DC PSY is
determined by the DCIN AICL algorithm that runs in software (not
hardware).

Currently, the algorithm is such that the DCIN AICL undergoes increment
only at the rate of 200 mA per second. Hence, it takes a few seconds for
the algorithm to reach completion and for the DC PSY property to reflect
its final, true capacity.

As a result, when the WIRELESS_VOTER is called upon to cast its vote as
a result of status change triggered by WLS attach, the value returned by
the DC PSY property is an incorrect value far lesser than its true
maximum owing to the DCIN AICL process not having finished executing
yet. The low vote it casts is not changed to the true maximum value
until many seconds later, leaving the charge pump disabled until then
due to low ILIM vote. This delay in the enabling of the charge pump is
seen by userspace, which is consequently forced to wait as well.

Prevent WIRELESS_VOTER from casting an incorrect vote prematurely by
causing it to wait until the DCIN AICL process has finished executing,
by which time the DC PSY's CURRENT_MAX property would safely and
accurately reflect its true max current capacity.

Change-Id: I913e77a2a3874b7ad93678cac8683b464d4340e0
Signed-off-by: default avatarGuru Das Srinagesh <gurus@codeaurora.org>
parent 8a1c1bab
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