mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
ensure that user configuration takes precedence.
sc760x: If there is no user configuration, set the value of thermal limit. Change-Id: I0866031ab7f33445846d868d2fa4202c51812185 Reviewed-on: https://gerrit.mot.com/2532545 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Wentao Xu <xuwt2@motorola.com> Reviewed-by: Tao Sun <suntao2@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
9f6038ec4a
commit
e9e36e9fca
1 changed files with 6 additions and 1 deletions
|
|
@ -297,6 +297,11 @@ static int sc760x_set_auto_bsm_dis(struct sc760x_chip *sc, bool en)
|
|||
|
||||
static int sc760x_set_ibat_limit(struct sc760x_chip *sc, int curr)
|
||||
{
|
||||
if (sc->user_ichg >= 0 && sc->user_ichg != curr) {
|
||||
curr = sc->user_ichg;
|
||||
dev_info(sc->dev, "%s : User request override ibat = %duA\n", __func__, curr);
|
||||
}
|
||||
|
||||
dev_info(sc->dev, "%s : %dmA\n", __func__, curr);
|
||||
|
||||
return sc760x_field_write(sc, IBAT_CHG_LIM,
|
||||
|
|
@ -687,7 +692,7 @@ static int sc760x_set_thermal_mitigation(struct sc760x_chip *sc, int val)
|
|||
if (!sc->num_thermal_levels)
|
||||
return 0;
|
||||
|
||||
if (sc->num_thermal_levels < 0 || sc->user_ichg) {
|
||||
if (sc->num_thermal_levels < 0) {
|
||||
pr_err("Incorrect num_thermal_levels\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue