From a42414454fd1415d5d10b7eb9a8d8fc4ada5952d Mon Sep 17 00:00:00 2001 From: Chen Shunqing Date: Mon, 21 Feb 2022 19:56:08 +0800 Subject: [PATCH] power: supply: bq25890: disable auto dp/dm detection if pd support Signed-off-by: Chen Shunqing Change-Id: Ib37679d60fa645771f6152309d0701d2bf768f7d --- drivers/power/supply/bq25890_charger.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/power/supply/bq25890_charger.c b/drivers/power/supply/bq25890_charger.c index af7733c097d7..ac3a8df54699 100644 --- a/drivers/power/supply/bq25890_charger.c +++ b/drivers/power/supply/bq25890_charger.c @@ -960,11 +960,6 @@ static void bq25890_set_pd_param(struct bq25890_device *bq, int vol, int cur) i++; } - if (cur <= 500000) - bq25890_field_write(bq, F_AUTO_DPDM_EN, 1); - else - bq25890_field_write(bq, F_AUTO_DPDM_EN, 0); - bq25890_field_write(bq, F_IILIM, iilim); bq25890_field_write(bq, F_VINDPM_OFS, vindpm); bq25890_field_write(bq, F_ICHG, ichg); @@ -1056,6 +1051,7 @@ static int bq25890_register_pd_psy(struct bq25890_device *bq) return ret; } + bq25890_field_write(bq, F_AUTO_DPDM_EN, 0); if (bq->nb.notifier_call) { notify_psy = power_supply_get_by_phandle(bq->dev->of_node, "ti,usb-charger-detection");