From e813af96648a551a794e33ff53a77ddbc31e46d1 Mon Sep 17 00:00:00 2001 From: gongsc1 Date: Fri, 24 Sep 2021 16:20:33 +0800 Subject: [PATCH] charger/bq25890: force D+/D- detection for APSD Improve BC1.2: add force D+/D- detection in the end of rerun autonomous power source detection. Change-Id: I97a5666bf3354d19d70f106dac41b239b8d4d119 Reviewed-on: https://gerrit.mot.com/2075617 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Huosheng Liao Submit-Approved: Jira Key --- drivers/power/bq2589x_chg_mmi/bq2589x_charger.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/power/bq2589x_chg_mmi/bq2589x_charger.c b/drivers/power/bq2589x_chg_mmi/bq2589x_charger.c index e0530b930f70..3dc22532d43a 100644 --- a/drivers/power/bq2589x_chg_mmi/bq2589x_charger.c +++ b/drivers/power/bq2589x_chg_mmi/bq2589x_charger.c @@ -1122,12 +1122,12 @@ static bq2589x_reuqest_dpdm(struct bq2589x *bq, bool enable) void bq2589x_enable_ilim(struct bq2589x *bq) { int ret; - dev_info(bq->dev, "%s:re-eable ILIM pin\n", __func__); + dev_info(bq->dev, "%s:re-enable ILIM pin\n", __func__); ret = bq2589x_update_bits(bq, BQ2589X_REG_00, BQ2589X_ENILIM_MASK, BQ2589X_ENILIM_ENABLE << BQ2589X_ENILIM_SHIFT); if (ret < 0) - dev_err(bq->dev, "cannot enable ILIM pin ret=%d\n", ret); + dev_err(bq->dev, "fail enable ILIM pin ret=%d\n", ret); else bq->real_charger_type = POWER_SUPPLY_TYPE_UNKNOWN; } @@ -1147,7 +1147,7 @@ static int bq2589x_rerun_adsp_if_required(struct bq2589x *bq) dev_err(bq->dev,"%s:cannot enable DPDM rc=%d\n",__func__, ret); bq->typec_apsd_rerun_done = true; - bq2589x_enable_ilim(bq); + bq2589x_force_dpdm(bq); return 0; }