From cc367ccc9d5270f3cd34eaedbd1013607ed29213 Mon Sep 17 00:00:00 2001 From: mahj8 Date: Mon, 25 Apr 2022 16:21:42 +0800 Subject: [PATCH] charging: delay 100ms to rerun apsd when charger inserted As sc89890H can't rerun apsd successful, add delay 100ms to wait IC idle and then rerun apsd to workaround this issue. Change-Id: I80f4efcbdbdd8244628ce65eb45368c03798af69 Signed-off-by: mahj8 Reviewed-on: https://gerrit.mot.com/2252095 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, 2 insertions(+) diff --git a/drivers/power/bq2589x_chg_mmi/bq2589x_charger.c b/drivers/power/bq2589x_chg_mmi/bq2589x_charger.c index 5c2d17d09a84..759471b6d31b 100644 --- a/drivers/power/bq2589x_chg_mmi/bq2589x_charger.c +++ b/drivers/power/bq2589x_chg_mmi/bq2589x_charger.c @@ -2203,6 +2203,8 @@ static void bq2589x_adapter_in_func(struct bq2589x *bq) && (!bq->typec_apsd_rerun_done)) { down(&bq->sem_dpdm); dev_err(bq->dev, "rerun apsd for 0x%x\n", bq->vbus_type); + if (bq->part_no == SC89890H) + msleep(100); bq2589x_rerun_apsd_if_required(bq); up(&bq->sem_dpdm); return;