power: supply: bq25890: disable auto dp/dm detection when pd in

Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: I2e19dd3a7c248ab968078dbd9b90f7490be6cb0c
This commit is contained in:
Chen Shunqing
2022-01-27 17:15:42 +08:00
committed by Tao Huang
parent 3ddaf8371c
commit f9b9472cbf

View File

@@ -996,6 +996,7 @@ static int bq25890_pd_notifier_call(struct notifier_block *nb,
if (prop.intval == 0) {
bq->pd_cur = 450000;
bq->pd_vol = 5000000;
bq25890_field_write(bq, F_AUTO_DPDM_EN, 1);
queue_delayed_work(bq->charger_wq, &bq->pd_work,
msecs_to_jiffies(10));
return NOTIFY_OK;
@@ -1012,6 +1013,7 @@ static int bq25890_pd_notifier_call(struct notifier_block *nb,
return NOTIFY_OK;
bq->pd_vol = prop.intval;
bq25890_field_write(bq, F_AUTO_DPDM_EN, 0);
queue_delayed_work(bq->charger_wq, &bq->pd_work,
msecs_to_jiffies(100));
}