Re: [PATCH v7 05/20] PM / devfreq: Add new passive governor

From: MyungJoo Ham
Date: Wed Apr 06 2016 - 06:06:20 EST


>
> This patch adds the new passive governor for DEVFREQ framework. The following
> governors are already present and used for DVFS (Dynamic Voltage and Frequency
> Scaling) drivers. The following governors are independently used for one device
[]
> Suggested-by: Myungjoo Ham <myungjoo.ham@xxxxxxxxxxx>
> Signed-off-by: Chanwoo Choi <cw00.choi@xxxxxxxxxxx>
> [tjakobi: Reported RCU locking issue and cw00.choi fix it.]
> Reported-by: Tobias Jakobi <tjakobi@xxxxxxxxxxxxxxxxxxxxx>

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

Please just edit the comment below and push to your git repo so that
I can simply pull your repo a day or two later.

> ---
> drivers/devfreq/Kconfig | 8 ++
> drivers/devfreq/Makefile | 1 +
> drivers/devfreq/governor_passive.c | 206 +++++++++++++++++++++++++++++++++++++
> include/linux/devfreq.h | 33 ++++++
> 4 files changed, 248 insertions(+)
> create mode 100644 drivers/devfreq/governor_passive.c
>
> diff --git a/drivers/devfreq/Kconfig b/drivers/devfreq/Kconfig
> index cedda8f1e5eb..d260cd0219f6 100644
[]
> diff --git a/drivers/devfreq/Makefile b/drivers/devfreq/Makefile
> index 8af8aaf922a8..2633087d5c63 100644
[]
> diff --git a/drivers/devfreq/governor_passive.c b/drivers/devfreq/governor_passive.c
> + /*
> + * If the parent and passive devfreq device uses the OPP table,
> + * get the next frequency by using the OPP table.

Doesn't need comments from here
> + * - parent devfreq device uses the governors except for passive.
> + * - passive devfreq device uses the passive governor.
> + */
> +
> + /*
To here.

> + * Each devfreq has the OPP table. After deciding the new frequency
> + * from the governor of parent devfreq device, the passive governor
> + * need to get the index of new frequency on OPP table of parent
> + * device. And then the index is used for getting the suitable
> + * new frequency for passive devfreq device.
> + */

[]

> diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h
> index 98c699304e12..2de4e2eea180 100644
[]