power: Disable HW JEITA for PMI632

As the h/w JEITA is enable by default, which will impact
the thermal charge profile in qpnp-smbcharger-mmi driver,
so disable it.

Since the h/w JEITA is not used, and mmi thermal charge
profile is used, the battery health in qpnp-smbcharger-mmi
driver should be used as the battery health property.

Change-Id: I53b8a7739f6c94307e076aad6e9234a3149db494
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1362570
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Yonghua Yan 2019-05-28 23:25:33 +08:00
commit 5889409334

View file

@ -3055,6 +3055,12 @@ static int batt_get_prop(struct power_supply *psy,
case POWER_SUPPLY_PROP_CYCLE_COUNT:
val->intval = chip->cycles / 100;
break;
case POWER_SUPPLY_PROP_HEALTH:
if (chip->max_main_psy && chip->max_flip_psy)
val->intval = chip->sm_param[MAIN_BATT].batt_health;
else
val->intval = chip->sm_param[BASE_BATT].batt_health;
break;
case POWER_SUPPLY_PROP_TEMP:
if (chip->max_main_psy && chip->max_flip_psy) {
union power_supply_propval main_psy_val;
@ -3549,7 +3555,10 @@ static int smb_mmi_probe(struct platform_device *pdev)
if (smblib_masked_write_mmi(chip, LEGACY_CABLE_CFG_REG,
0xFF, 0))
mmi_err(chip, "SMBMMI: Could Not set Legacy Cable CFG\n");
}
if (chip->smb_version == PM8150B_SUBTYPE ||
chip->smb_version == PMI632_SUBTYPE) {
/* Ensure SW JEITA is DISABLED */
pval.intval = 0;
power_supply_set_property(chip->qcom_psy,