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

Commit e7cb5bfc authored by Viresh Kumar's avatar Viresh Kumar Committed by Kevin Hilman
Browse files

thermal: cpu_cooling: Store frequencies in descending order



CPUFreq framework *doesn't* guarantee that frequencies present in cpufreq table
will be in ascending or descending order. But cpu_cooling somehow assumes that.

Probably because most of current users are creating this list from DT, which is
done with the help of OPP layer. And OPP layer creates the list in ascending
order of frequencies.

But cpu_cooling can be used for other platforms too, which don't have
frequencies arranged in any order.

This patch tries to fix this issue by creating another list of valid frequencies
in descending order. Care is also taken to throw warnings for duplicate entries.

Later patches would use it to simplify code.

Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
(cherry picked from commit f6859014c7e7cc0e7688525741fc3a0e7aee63be)
Signed-off-by: default avatarKevin Hilman <khilman@linaro.org>
parent 8cc827a1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment