Set paired battery discharge load based paired_ichg

Configure the paired battery load according to the paired_ichg
which comes from the delta_soc mapping for paired battery voltage
and soc balance.

Change-Id: I8b4c5b0f95bec1656a96dfaf060d6b593052bfaa
Signed-off-by: yanyh2 <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/2192804
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
yanyh2 2022-02-17 10:34:57 +08:00 • committed by Yonghua Yan
commit b096b71953

View file

@ -2265,10 +2265,11 @@ static void sgm4154x_paired_battery_notify(void *data,
WARN_ON(paired_load == PAIRED_LOAD_OFF);
}
if (initialized &&
paired_ichg > 0 &&
chg->paired_load != PAIRED_LOAD_HIGH) {
chg->paired_load = PAIRED_LOAD_HIGH;
if (initialized && paired_ichg > 0) {
if (paired_ichg < chg->sgm->init_data.max_ichg / 2)
paired_load = PAIRED_LOAD_LOW;
else
paired_load = PAIRED_LOAD_HIGH;
}
if (paired_load != chg->paired_load) {