• Z
    Thermal: cpufreq cooling: fix parsing per_cpu cpufreq_frequency_table · fc35b35c
    Zhang Rui 提交于
    cpufreq cooling uses different frequencies as different cooling states.
    
    But the per_cpu cpufreq_frequency_table may contain duplicate,
    invalid entries, and it may be in either ascending or descending order.
    And currently, code for parsing the per_cpu cpufreq_frequency_table
    is used in several places and inconsistent.
    
    Now introduce new code to
    1. get the maximum cooling states
    2. translate cooling state to cpu frequency
    3. translate cpu frequency to cooling state
    in one place,
    with the correct logic of handling per_cpu cpufreq_frequency_table.
    Signed-off-by: NZhang Rui <rui.zhang@intel.com>
    Tested-by: NAmit Daniel kachhap <amit.daniel@samsung.com>
    fc35b35c
cpu_cooling.c 12.1 KB