Skip to content

Commit

Permalink
restart the phone after the aging is complete
Browse files Browse the repository at this point in the history
Change-Id: I6e8233d8f23cb4b3a44fb1c3d0b21949bca40875
Signed-off-by: engstk <[email protected]>
  • Loading branch information
binson-xu authored and engstk committed Jul 22, 2020
1 parent 20c79de commit daedcde
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
17 changes: 8 additions & 9 deletions drivers/power/supply/qcom/smb5-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -8654,7 +8654,9 @@ static void op_check_high_vbat_chg_work(struct work_struct *work)
if (chg->wireless_present
|| chg->usb_enum_status
|| chg->chg_done
|| chg->chg_disabled) {
|| chg->chg_disabled
|| !chg->chg_enabled
|| chg->is_aging_test) {
chg->check_high_vbat_chg_count = 0;
return;
}
Expand Down Expand Up @@ -8690,10 +8692,12 @@ static void op_check_high_vbat_chg_work(struct work_struct *work)
if (chg->check_high_vbat_chg_count > 100) {
pr_info("recovery charge\n");
chg->check_high_vbat_chg_count = 0;
smblib_set_usb_suspend(chg, true);
vote(chg->usb_icl_votable, CHG_RECOVERY_VOTER,
true, 0);
op_charging_en(chg, false);
msleep(1000);
smblib_set_usb_suspend(chg, false);
vote(chg->usb_icl_votable, CHG_RECOVERY_VOTER,
false, 0);
op_charging_en(chg, true);
} else {
chg->check_high_vbat_chg_count++;
Expand Down Expand Up @@ -10290,11 +10294,6 @@ bool check_skin_thermal_high(void)
if (g_chg->pd_active && !g_chg->enable_pd_current_adjust)
return false;

if (!g_chg->oem_lcd_is_on) {
pr_info("lcd is off, skip.");
return false;
}

thermal_temp = op_get_skin_thermal_temp(g_chg);
if (thermal_temp >= 0)
return g_chg->is_skin_thermal_high;
Expand All @@ -10313,7 +10312,7 @@ bool check_skin_thermal_medium(void)
return false;

thermal_temp = op_get_skin_thermal_temp(g_chg);
if (thermal_temp >= 0 && g_chg->oem_lcd_is_on)
if (thermal_temp >= 0)
return g_chg->is_skin_thermal_medium;
else
return false;
Expand Down
1 change: 1 addition & 0 deletions drivers/power/supply/qcom/smb5-lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ enum print_reason {
#define OVERHEAT_LIMIT_VOTER "OVERHEAT_LIMIT_VOTER"
/* @bsp, 2020/02/19 Wireless charge FFC */
#define WLCH_FFC_VOTER "WLCH_FFC_VOTER"
#define CHG_RECOVERY_VOTER "CHG_RECOVERY_VOTER"

#define BOOST_BACK_STORM_COUNT 3
#define WEAK_CHG_STORM_COUNT 8
Expand Down

0 comments on commit daedcde

Please sign in to comment.