Skip ichg set during paired notify in factory mode

Skip ichg set during paired notify in factory mode to avoid
dual battery charging balance policy disturb the factory test.

Change-Id: Id4ddd606e4544f4adf532affee232347ca3efce5
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/2286055
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:
Yonghua Yan 2022-06-01 18:53:02 +08:00
commit 6e4e7b316f

View file

@ -2317,7 +2317,8 @@ static void sgm4154x_paired_battery_notify(void *data,
}
paired_ichg *= 1000;
}
if (paired_ichg != chg->paired_ichg) {
if (!chg->constraint.factory_mode &&
paired_ichg != chg->paired_ichg) {
value = min(chg->chg_cfg.target_fcc * 1000, chg->paired_ichg);
rc = sgm4154x_set_ichrg_curr(chg->sgm, value);
if (!rc)