Skip to content

Commit

Permalink
Revert "power:supply:qcom: queue works into a power efficient WQ"
Browse files Browse the repository at this point in the history
This reverts commit 93a7e27295d76f83be37a350031ba7c549089286.

Signed-off-by: TogoFire <togofire@mailfence.com>
Change-Id: I421308043c2ce0b22b05dbbb3b3cedb7417f38b4
  • Loading branch information
TogoFire committed May 24, 2023
1 parent afe0f85 commit 66f067f
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions drivers/power/supply/qcom/battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -814,8 +814,7 @@ static void fcc_stepper_work(struct work_struct *work)
chip->slave_fcc_ua = parallel_fcc;

if (reschedule_ms) {
queue_delayed_work(system_power_efficient_wq,
&chip->fcc_stepper_work,
schedule_delayed_work(&chip->fcc_stepper_work,
msecs_to_jiffies(reschedule_ms));
pr_debug("Rescheduling FCC_STEPPER work\n");
return;
Expand Down Expand Up @@ -932,9 +931,8 @@ static int usb_icl_vote_callback(struct votable *votable, void *data,
if (icl_ua <= 1400000)
vote(chip->pl_enable_votable_indirect, USBIN_I_VOTER, false, 0);
else
queue_delayed_work(system_power_efficient_wq,
&chip->status_change_work,
msecs_to_jiffies(PL_DELAY_MS));
schedule_delayed_work(&chip->status_change_work,
msecs_to_jiffies(PL_DELAY_MS));

/* rerun AICL */
/* get the settled current */
Expand Down Expand Up @@ -1077,8 +1075,8 @@ static int pl_disable_vote_callback(struct votable *votable,
if (chip->step_fcc) {
vote(chip->pl_awake_votable, FCC_STEPPER_VOTER,
true, 0);
queue_delayed_work(system_power_efficient_wq,
&chip->fcc_stepper_work,0);
schedule_delayed_work(&chip->fcc_stepper_work,
0);
}
} else {
/*
Expand Down Expand Up @@ -1209,17 +1207,16 @@ static int pl_disable_vote_callback(struct votable *votable,
if (chip->step_fcc) {
vote(chip->pl_awake_votable, FCC_STEPPER_VOTER,
true, 0);
queue_delayed_work(system_power_efficient_wq,
&chip->fcc_stepper_work,0);
schedule_delayed_work(&chip->fcc_stepper_work,
0);
}
}

rerun_election(chip->fv_votable);

cancel_delayed_work_sync(&chip->pl_awake_work);
queue_delayed_work(system_power_efficient_wq,
&chip->pl_awake_work,
msecs_to_jiffies(5000));
schedule_delayed_work(&chip->pl_awake_work,
msecs_to_jiffies(5000));
}

/* notify parallel state change */
Expand Down Expand Up @@ -1551,8 +1548,7 @@ static int pl_notifier_call(struct notifier_block *nb,
if ((strcmp(psy->desc->name, "parallel") == 0)
|| (strcmp(psy->desc->name, "battery") == 0)
|| (strcmp(psy->desc->name, "main") == 0))
queue_delayed_work(system_power_efficient_wq,
&chip->status_change_work, 0);
schedule_delayed_work(&chip->status_change_work, 0);

return NOTIFY_OK;
}
Expand Down

0 comments on commit 66f067f

Please sign in to comment.