From 65c2b4a16570e7c5bbda783b25b3e5c4df7795ce Mon Sep 17 00:00:00 2001 From: Haijian Ma Date: Mon, 18 Nov 2019 17:33:31 +0800 Subject: [PATCH] MMI: Init batt health to GOOD batt health is only set in normal mode, so batt health is unknown in factory mode, so Init it to POWER_SUPPLY_HEALTH_GOOD. Change-Id: I3c8de02fc8e07c9d1bdc65ea4b530927d1eec343 Signed-off-by: Haijian Ma Reviewed-on: https://gerrit.mot.com/1456963 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Lu Chai Reviewed-by: Huosheng Liao Submit-Approved: Jira Key --- drivers/power/qpnp-smbcharger-mmi/qpnp-smbcharger-mmi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/power/qpnp-smbcharger-mmi/qpnp-smbcharger-mmi.c b/drivers/power/qpnp-smbcharger-mmi/qpnp-smbcharger-mmi.c index 35c1942c09fc..471c281b1b5f 100644 --- a/drivers/power/qpnp-smbcharger-mmi/qpnp-smbcharger-mmi.c +++ b/drivers/power/qpnp-smbcharger-mmi/qpnp-smbcharger-mmi.c @@ -3904,6 +3904,7 @@ static int smb_mmi_probe(struct platform_device *pdev) chip->soc_cycles_start = EMPTY_CYCLES; chip->last_reported_soc = -1; chip->last_reported_status = -1; + chip->sm_param[BASE_BATT].batt_health = POWER_SUPPLY_HEALTH_GOOD; chip->qcom_psy = power_supply_get_by_name("qcom_battery"); if (chip->qcom_psy) { chip->batt_psy = devm_power_supply_register(chip->dev,