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

Commit d81f73c8 authored by Abhijeet Dharmapurikar's avatar Abhijeet Dharmapurikar
Browse files

power: qpnp-smbcharger: Add support for dynamic ICL for Wipower



The PMI8994 separates the input current limit (ICL) into three discrete
operating ranges:
When the stark is in pass through mode
When the stark is in div2 mode with DCIN voltage  < 6.5V
When the stark is in div2 mode with DCIN voltage  > 6.5V

These three modes cover the entire range of DCIN voltage but only have
three entries for ICL. This may lead to unoptimized power draw if the
operating voltage falls at the lower side of the range.

Introduce a method to reprogram the ICL based on the input voltage and
the div2 signal. This is a software way to increase the operating ranges
from three to many where s/w programs ICLs (for all the three h/w ranges)
based on existing conditions.

Use the adc btm-like feature to get notifications when the input voltage
goes outside a range. Note that there is no interrupt when div2 signal
changes, hence based on the range program all the ICLs so that hw will
use proper limits based on the div2 signal.

If the voltage range falls outside the known limits, default to a safe
value.

Change-Id: I6a7974c874352a31ce998110b8c2ba62efe7d1f0
Signed-off-by: default avatarAbhijeet Dharmapurikar <adharmap@codeaurora.org>
parent 9dc51ecf
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