Re: [PATCH v4 5/8] PM / devfreq: Show the all available frequencies

From: MyungJoo Ham
Date: Tue Oct 17 2017 - 10:51:21 EST


On Fri, Oct 13, 2017 at 4:48 PM, Chanwoo Choi <cw00.choi@xxxxxxxxxxx> wrote:
> The commit a76caf55e5b35 ("thermal: Add devfreq cooling") allows
> the devfreq device to use the cooling device. When the cooling down
> are required, the devfreq_cooling.c disables the OPP entry with
> the dev_pm_opp_disable(). In result, 'available_frequencies'[1]
> sysfs node never came to show the all available frequencies.
> [1] /sys/class/devfreq/.../available_frequencies
>
> So, this patch uses the 'freq_table' in the 'struct devfreq_dev_profile'
> in order to show the all available frequencies.
> - If 'freq_table' is NULL, devfreq core initializes them by using OPP values.
> - If 'freq_table' is initialized, devfreq core just uses the 'freq_table'.
>
> And this patch adds some comment about the sort way of 'freq_table'.
>
> Signed-off-by: Chanwoo Choi <cw00.choi@xxxxxxxxxxx>

Acked-by: MyungJoo Ham <myungjoo.ham@xxxxxxxxxxx>


> ---
> drivers/devfreq/devfreq.c | 16 +++++-----------
> include/linux/devfreq.h | 5 +++--
> 2 files changed, 8 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
> index 909cedef7caa..534ead60d1cc 100644
[]