mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
charging: improve recharge batt voltage after stop
Increase recharge battery voltage after stop state prevent charge and discharge frequently Change-Id: I070eef8f61d363772f17021b42b8341e5765ce44 Signed-off-by: mahj8 <mahj8@motorola.com> Reviewed-on: https://gerrit.mot.com/2204350 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Yonghua Yan <yanyh2@motorola.com> Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
19e45429be
commit
dceabb006f
1 changed files with 15 additions and 2 deletions
|
|
@ -1381,6 +1381,7 @@ static void mmi_update_charger_status(struct mmi_charger_chip *chip,
|
|||
struct mmi_charger *charger)
|
||||
{
|
||||
bool voltage_full;
|
||||
int stop_recharge_hyst;
|
||||
enum charging_limit_modes charging_limit_modes;
|
||||
struct mmi_charger_profile *profile = &charger->profile;
|
||||
struct mmi_charger_status *status = &charger->status;
|
||||
|
|
@ -1429,8 +1430,7 @@ static void mmi_update_charger_status(struct mmi_charger_chip *chip,
|
|||
} else if (!status->temp_zone) {
|
||||
status->pres_chrg_step = STEP_MAX;
|
||||
/* Skip for empty temperature zone */
|
||||
} else if ((status->pres_chrg_step == STEP_NONE) ||
|
||||
(status->pres_chrg_step == STEP_STOP)) {
|
||||
} else if (status->pres_chrg_step == STEP_NONE) {
|
||||
if (status->temp_zone->norm_mv &&
|
||||
((batt_info->batt_mv + HYST_STEP_MV) >= status->temp_zone->norm_mv)) {
|
||||
if (status->temp_zone->fcc_norm_ma)
|
||||
|
|
@ -1439,6 +1439,19 @@ static void mmi_update_charger_status(struct mmi_charger_chip *chip,
|
|||
status->pres_chrg_step = STEP_STOP;
|
||||
} else
|
||||
status->pres_chrg_step = STEP_MAX;
|
||||
} else if (status->pres_chrg_step == STEP_STOP) {
|
||||
if (batt_info->batt_temp > COOL_TEMP)
|
||||
stop_recharge_hyst = 2 * HYST_STEP_MV;
|
||||
else
|
||||
stop_recharge_hyst = 5 * HYST_STEP_MV;
|
||||
if (status->temp_zone->norm_mv &&
|
||||
((batt_info->batt_mv + stop_recharge_hyst) >= status->temp_zone->norm_mv)) {
|
||||
if (status->temp_zone->fcc_norm_ma)
|
||||
status->pres_chrg_step = STEP_NORM;
|
||||
else
|
||||
status->pres_chrg_step = STEP_STOP;
|
||||
} else
|
||||
status->pres_chrg_step = STEP_MAX;
|
||||
} else if (status->pres_chrg_step == STEP_MAX) {
|
||||
if (!status->temp_zone->norm_mv) {
|
||||
/* No Step in this Zone */
|
||||
|
|
|
|||
Loading…
Reference in a new issue