pnangn:2nd charger sc8989 ICL3A set to 0x3a

2nd main chager sc8989 set icl 3a to 0x3f = 3.25A

should set icl 3a to 0x3a = 3A

Change-Id: I2e711a1f124120c1ae030c066486221ca6d813ec
Reviewed-on: https://gerrit.mot.com/2427490
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qiong Xie <xieq2@motorola.com>
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
lbh 2022-11-11 16:14:35 +08:00 • committed by longc136
commit 95c8cf02a3

View file

@ -617,8 +617,12 @@ int bq2589x_set_input_current_limit(struct bq2589x *bq, int curr)
if (curr < BQ2589X_IINLIM_BASE)
val = 0;
/*for HW accuracy issue, so icl >= 3A we need to set 0x3F*/
else if (curr >= BQ2589X_IINLIM_MAX)
val = 0x3F;
else if (curr >= BQ2589X_IINLIM_MAX){
if (bq->part_no == SC89890H)
val = 0x3A;
else
val = 0x3F;
}
else
val = (curr - BQ2589X_IINLIM_BASE) / BQ2589X_IINLIM_LSB;