power: qpnp-smbcharger-mmi: Allow force higher temp limits

For testing purposes and due to continuous hardware modifications,
some temperature values may provide incorrect values due to
thermistor positioning or calibration. Hence, performing runtime
temperature limitation sets for internal testing can avoid
unexpected behaviors, l(CR) charging speed limitations.

Change-Id: I5016cd2ddeb7c8c3afbeb1277a208dbc80853709
Signed-off-by: Cesar Santos <cmsantos@motorola.com>
Reviewed-on: https://gerrit.mot.com/1432920
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Cesar Santos 2019-10-07 15:07:57 -03:00 • committed by Cesar Augusto Marcelino dos Santos
commit 4bd9556c01

View file

@ -706,10 +706,12 @@ static ssize_t force_max_chrg_temp_store(struct device *dev,
return -ENODEV;
}
if ((mode >= MIN_MAX_TEMP_C) && (mode <= MAX_TEMP_C))
mmi_chip->max_chrg_temp = mode;
else
mmi_chip->max_chrg_temp = MAX_TEMP_C;
// MMI_STOPSHIP revert this commit later: safer to have limits. Temporary for Burton EVT1
if ((mode < MIN_MAX_TEMP_C) || (mode > MAX_TEMP_C))
pr_warn("New value %d is outside of suggested limits: min %d, max %d",
mode, MIN_MAX_TEMP_C, MAX_TEMP_C);
mmi_chip->max_chrg_temp = mode;
return r ? r : count;
}