Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cpufreq: tegra: update comment for clarity

Tegra's driver got updated a bit (00917dd cpufreq: Tegra: implement intermediate
frequency callbacks) and implements new 'intermediate freq' infrastructure of
core. Above commit updated comments about when to call
clk_prepare_enable(pll_x_clk) and Doug wasn't satisfied with those comments and
said this:

> The "Though when target-freq is intermediate freq, we don't need to
> take this reference." makes me think that this function is actually
> called when target-freq is intermediate freq.  I don't think it is,
> right?

For better clarity just make that comment more explicit about when we call
tegra_target_intermediate().

Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reported-and-reviewed-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Viresh Kumar and committed by
Rafael J. Wysocki
40cc5490 830bcac4

+6 -3
+6 -3
drivers/cpufreq/tegra-cpufreq.c
··· 71 71 /* 72 72 * Take an extra reference to the main pll so it doesn't turn 73 73 * off when we move the cpu off of it as enabling it again while we 74 - * switch to it from tegra_target() would take additional time. Though 75 - * when target-freq is intermediate freq, we don't need to take this 76 - * reference. 74 + * switch to it from tegra_target() would take additional time. 75 + * 76 + * When target-freq is equal to intermediate freq we don't need to 77 + * switch to an intermediate freq and so this routine isn't called. 78 + * Also, we wouldn't be using pll_x anymore and must not take extra 79 + * reference to it, as it can be disabled now to save some power. 77 80 */ 78 81 clk_prepare_enable(pll_x_clk); 79 82