Loading drivers/power/supply/qcom/qpnp-fg-gen4.c +11 −2 Original line number Diff line number Diff line Loading @@ -3333,13 +3333,16 @@ static void fg_gen4_exit_soc_scale(struct fg_gen4_chip *chip) if (chip->soc_scale_mode) { alarm_cancel(&chip->soc_scale_alarm_timer); if (work_busy(&chip->soc_scale_work) != WORK_BUSY_RUNNING) cancel_work_sync(&chip->soc_scale_work); /* While exiting soc_scale_mode, Update MSOC register */ fg_gen4_write_scale_msoc(chip); } chip->soc_scale_mode = false; fg_dbg(fg, FG_FVSS, "Exit FVSS mode\n"); fg_dbg(fg, FG_FVSS, "Exit FVSS mode, work_status=%d\n", work_busy(&chip->soc_scale_work)); } static int fg_gen4_validate_soc_scale_mode(struct fg_gen4_chip *chip) Loading Loading @@ -4055,6 +4058,12 @@ static void soc_scale_work(struct work_struct *work) if (rc < 0) pr_err("Failed to validate SOC scale mode, rc=%d\n", rc); /* re-validate soc scale mode as we may have exited FVSS */ if (!chip->soc_scale_mode) { fg_dbg(fg, FG_FVSS, "exit soc scale mode\n"); return; } if (chip->vbatt_res <= 0) chip->vbatt_res = 0; Loading Loading
drivers/power/supply/qcom/qpnp-fg-gen4.c +11 −2 Original line number Diff line number Diff line Loading @@ -3333,13 +3333,16 @@ static void fg_gen4_exit_soc_scale(struct fg_gen4_chip *chip) if (chip->soc_scale_mode) { alarm_cancel(&chip->soc_scale_alarm_timer); if (work_busy(&chip->soc_scale_work) != WORK_BUSY_RUNNING) cancel_work_sync(&chip->soc_scale_work); /* While exiting soc_scale_mode, Update MSOC register */ fg_gen4_write_scale_msoc(chip); } chip->soc_scale_mode = false; fg_dbg(fg, FG_FVSS, "Exit FVSS mode\n"); fg_dbg(fg, FG_FVSS, "Exit FVSS mode, work_status=%d\n", work_busy(&chip->soc_scale_work)); } static int fg_gen4_validate_soc_scale_mode(struct fg_gen4_chip *chip) Loading Loading @@ -4055,6 +4058,12 @@ static void soc_scale_work(struct work_struct *work) if (rc < 0) pr_err("Failed to validate SOC scale mode, rc=%d\n", rc); /* re-validate soc scale mode as we may have exited FVSS */ if (!chip->soc_scale_mode) { fg_dbg(fg, FG_FVSS, "exit soc scale mode\n"); return; } if (chip->vbatt_res <= 0) chip->vbatt_res = 0; Loading