From 65e562459f2c83f10a65b1762f646bf1eaa22f49 Mon Sep 17 00:00:00 2001 From: Ryan Lattrel Date: Thu, 7 Nov 2019 17:53:30 -0600 Subject: [PATCH] qpnp-smbcharger-mmi: fix wireless charging state machine State machine doesn't work with wireless charging because it does not trigger the charger_present variable. Account for this by also checking for wls online. Change-Id: Ib7ce5d3ec1374df614c196329820b766032ad5bf Signed-off-by: Ryan Lattrel Reviewed-on: https://gerrit.mot.com/1451157 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Cesar Augusto Marcelino dos Santos Reviewed-by: Ling Jin Submit-Approved: Jira Key --- drivers/power/qpnp-smbcharger-mmi/qpnp-smbcharger-mmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/qpnp-smbcharger-mmi/qpnp-smbcharger-mmi.c b/drivers/power/qpnp-smbcharger-mmi/qpnp-smbcharger-mmi.c index 1b48366727ca..73abd1730eb1 100644 --- a/drivers/power/qpnp-smbcharger-mmi/qpnp-smbcharger-mmi.c +++ b/drivers/power/qpnp-smbcharger-mmi/qpnp-smbcharger-mmi.c @@ -2552,7 +2552,7 @@ static void mmi_basic_charge_sm(struct smb_mmi_charger *chip, mmi_find_temp_zone(chip, prm, stat->batt_temp); zone = &prm->temp_zones[prm->pres_temp_zone]; - if (!stat->charger_present) { + if (!stat->charger_present && !is_wls_online(chip)) { prm->pres_chrg_step = STEP_NONE; } else if ((prm->pres_temp_zone == ZONE_HOT) || (prm->pres_temp_zone == ZONE_COLD) ||