From 3da8d50e426c7e19db6d42d6eb0299a9299b0190 Mon Sep 17 00:00:00 2001 From: gongsc1 Date: Mon, 8 Jul 2019 14:36:34 +0800 Subject: [PATCH] power:qpnp-smbcharger-mmi:Remove charger config for factory Factory sw usually use AC adapter to do Runin test. They think power not off when finished test is a bug. Change-Id: I28ce0d32c4e2c75c7328ac5f1158ebac039919bb Reviewed-on: https://gerrit.mot.com/1382878 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Ryan Lattrel Reviewed-by: Cesar Augusto Marcelino dos Santos Reviewed-by: Ling Jin Submit-Approved: Jira Key --- .../qpnp-smbcharger-mmi/qpnp-smbcharger-mmi.c | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/drivers/power/qpnp-smbcharger-mmi/qpnp-smbcharger-mmi.c b/drivers/power/qpnp-smbcharger-mmi/qpnp-smbcharger-mmi.c index 41db1c915535..4778e0f6cb08 100644 --- a/drivers/power/qpnp-smbcharger-mmi/qpnp-smbcharger-mmi.c +++ b/drivers/power/qpnp-smbcharger-mmi/qpnp-smbcharger-mmi.c @@ -3730,30 +3730,6 @@ static int smb_mmi_probe(struct platform_device *pdev) chip->dc_cl_ma); } - pval.intval = 0; - rc = power_supply_get_property(chip->usb_psy, - POWER_SUPPLY_PROP_REAL_TYPE, - &pval); - if (!rc && - chip->factory_mode && - (pval.intval != POWER_SUPPLY_TYPE_UNKNOWN) && - (pval.intval != POWER_SUPPLY_TYPE_USB) && - (pval.intval != POWER_SUPPLY_TYPE_USB_CDP)) { - mmi_info(chip, "Charger Present; Dis Factory Mode\n"); - chip->factory_mode = false; - if(chip->chg_dis_votable) - pmic_vote_force_active_set(chip->chg_dis_votable, 0); - - if(chip->fcc_votable) - pmic_vote_force_active_set(chip->fcc_votable, 0); - - if(chip->fv_votable) - pmic_vote_force_active_set(chip->fv_votable, 0); - - if(chip->usb_icl_votable) - pmic_vote_force_active_set(chip->usb_icl_votable, 0); - } - /* Workaround for some cables that collapse on boot */ if (!chip->factory_mode) { dev_err(chip->dev, "Suspending USB for 50 ms to clear\n");