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:
Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Loading
Please register or sign in to comment