Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d139f5e3 authored by Veerabhadrarao Badiganti's avatar Veerabhadrarao Badiganti
Browse files

mmc: core: Update target-frequency while resuming clock scaling



The frequency comparison in clock scaling while setting the target
frequency was changed from current-frequency to target-frequency
against the requested frequency by the commit <3a6f149d>
("mmc: core: Use new flag for suspending clk scaling").

When clock scaling is disabled and re-enabled, current-frequency
gets updated to max frequency but target-frequency remains at its
old value. Due to this clock is not scaling down and causing power
regressions.

To fix this issue, updating the target-frequency with the current-
frequency during clock scaling resume.

Change-Id: Ia033542724aac1f77f2dfbde0d9784e4c0657844
Signed-off-by: default avatarVeerabhadrarao Badiganti <vbadigan@codeaurora.org>
parent f43dabe3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -872,6 +872,7 @@ int mmc_resume_clk_scaling(struct mmc_host *host)
	host->clk_scaling.curr_freq = devfreq_max_clk;
	if (host->ios.clock < host->clk_scaling.freq_table[max_clk_idx])
		host->clk_scaling.curr_freq = devfreq_min_clk;
	host->clk_scaling.target_freq = host->clk_scaling.curr_freq;

	err = devfreq_resume_device(host->clk_scaling.devfreq);
	if (err) {