From 424fc3bd64c3b13ff8e46c989bb7bc7505a39b4e Mon Sep 17 00:00:00 2001 From: mahj8 Date: Fri, 12 Nov 2021 14:14:46 +0800 Subject: [PATCH] charging: fixed sometimes don't request dpdm issue sometimes vbus type don't equal to NONE, so don't request dpdm, so qc3.0 can't be correctly identified. we must request dpdm when charger inserted. Change-Id: I68f48ac713e468250709a6788dddf57e460887d0 Signed-off-by: mahj8 Reviewed-on: https://gerrit.mot.com/2114459 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/bq2589x_chg_mmi/bq2589x_charger.c b/drivers/power/bq2589x_chg_mmi/bq2589x_charger.c index 9367d496e644..ed8b39d147f1 100644 --- a/drivers/power/bq2589x_chg_mmi/bq2589x_charger.c +++ b/drivers/power/bq2589x_chg_mmi/bq2589x_charger.c @@ -2029,7 +2029,7 @@ static void bq2589x_charger_irq_workfunc(struct work_struct *work) bq->vbus_type = (status & BQ2589X_VBUS_STAT_MASK) >> BQ2589X_VBUS_STAT_SHIFT; - if (state.vbus_gd && (bq->vbus_type == BQ2589X_VBUS_NONE)){ + if (state.vbus_gd && (!bq->dpdm_enabled)) { dev_info(bq->dev, "BC1.2 detect is not done.\n"); bq2589x_reuqest_dpdm(bq, true); }