linux/drivers/thermal
Finley Xiao d3b7bacd11 thermal/drivers/cpufreq_cooling: Fix wrong frequency converted from power
commit 371a3bc79c upstream.

The function cpu_power_to_freq is used to find a frequency and set the
cooling device to consume at most the power to be converted. For example,
if the power to be converted is 80mW, and the em table is as follow.
struct em_cap_state table[] = {
	/* KHz     mW */
	{ 1008000, 36, 0 },
	{ 1200000, 49, 0 },
	{ 1296000, 59, 0 },
	{ 1416000, 72, 0 },
	{ 1512000, 86, 0 },
};
The target frequency should be 1416000KHz, not 1512000KHz.

Fixes: 349d39dc57 ("thermal: cpu_cooling: merge frequency and power tables")
Cc: <stable@vger.kernel.org> # v4.13+
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20200619090825.32747-1-finley.xiao@rock-chips.com
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-22 09:33:16 +02:00
..
broadcom
intel thermal: int3403_thermal: Downgrade error message 2020-07-22 09:33:15 +02:00
qcom
samsung
st
tegra
ti-soc-thermal
Kconfig
Makefile
armada_thermal.c
clock_cooling.c
cpu_cooling.c thermal/drivers/cpufreq_cooling: Fix wrong frequency converted from power 2020-07-22 09:33:16 +02:00
da9062-thermal.c
db8500_thermal.c
devfreq_cooling.c
dove_thermal.c
fair_share.c
gov_bang_bang.c
hisi_thermal.c
imx_thermal.c thermal/drivers: imx: Fix missing of_node_put() at probe time 2020-07-22 09:32:52 +02:00
kirkwood_thermal.c
max77620_thermal.c
mtk_thermal.c Revert "thermal: mediatek: fix register index error" 2020-07-22 09:33:03 +02:00
of-thermal.c
power_allocator.c
qoriq_thermal.c
rcar_gen3_thermal.c thermal/drivers/rcar_gen3: Fix undefined temperature if negative 2020-07-09 09:37:53 +02:00
rcar_thermal.c
rockchip_thermal.c
spear_thermal.c
step_wise.c
tango_thermal.c
thermal-generic-adc.c
thermal_core.c
thermal_core.h
thermal_helpers.c
thermal_hwmon.c
thermal_hwmon.h
thermal_mmio.c
thermal_sysfs.c
uniphier_thermal.c
user_space.c
zx2967_thermal.c