charging: enable absolute vindpm

The force vindpm bit will clear by itself when remove charger,
so need re-set force vindpm bit when use absolute vindpm.

Change-Id: I8c8c5747c3ee58b9394c35ca0c0f465cdb52064b
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2116766
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
mahj8 2021-11-16 09:42:20 +08:00 • committed by Haijian Ma
commit cdef1f9524

View file

@ -1805,6 +1805,10 @@ static void bq2589x_adapter_in_func(struct bq2589x *bq)
}
if (bq->cfg.use_absolute_vindpm) {
ret = bq2589x_use_absolute_vindpm(bq, true);
if (ret < 0)
dev_err(bq->dev,"%s:force vindpm failed:%d\n",__func__,ret);
ret = bq2589x_set_input_volt_limit(bq, 4600);
if (ret < 0)
dev_err(bq->dev,"%s:reset vindpm threshold to 4600 failed:%d\n",__func__,ret);