[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHLCerPJkwi9o5p6UheC+bkdkSYu1fZu5jjWrOjWeSk8+R75ZQ@mail.gmail.com>
Date: Wed, 6 May 2020 15:27:10 +0530
From: Amit Kucheria <amit.kucheria@...durent.com>
To: Daniel Lezcano <daniel.lezcano@...aro.org>
Cc: Zhang Rui <rui.zhang@...el.com>, Lukasz Luba <lukasz.luba@....com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Sudeep Holla <sudeep.holla@....com>,
"open list:CPU IDLE TIME MANAGEMENT FRAMEWORK"
<linux-pm@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>,
"open list:CPUIDLE DRIVER - ARM PSCI"
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v4 4/4] thermal: cpuidle: Register cpuidle cooling device
On Wed, Apr 29, 2020 at 4:07 PM Daniel Lezcano
<daniel.lezcano@...aro.org> wrote:
>
> The cpuidle driver can be used as a cooling device by injecting idle
> cycles. The DT binding for the idle state added an optional
Incomplete sentence.
> When the property is set, register the cpuidle driver with the idle
> state node pointer as a cooling device. The thermal framework will do
> the association automatically with the thermal zone via the
> cooling-device defined in the device tree cooling-maps section.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@...aro.org>
Conditionally,
Reviewed-by: Amit Kucheria <amit.kucheria@...aro.org>
> ---
> - V4:
> - Do not check the return value as the function does no longer return one
> ---
> drivers/cpuidle/cpuidle-arm.c | 3 +++
> drivers/cpuidle/cpuidle-psci.c | 3 +++
> 2 files changed, 6 insertions(+)
>
> diff --git a/drivers/cpuidle/cpuidle-arm.c b/drivers/cpuidle/cpuidle-arm.c
> index 9e5156d39627..8c758920d699 100644
> --- a/drivers/cpuidle/cpuidle-arm.c
> +++ b/drivers/cpuidle/cpuidle-arm.c
> @@ -8,6 +8,7 @@
>
> #define pr_fmt(fmt) "CPUidle arm: " fmt
>
> +#include <linux/cpu_cooling.h>
> #include <linux/cpuidle.h>
> #include <linux/cpumask.h>
> #include <linux/cpu_pm.h>
> @@ -124,6 +125,8 @@ static int __init arm_idle_init_cpu(int cpu)
> if (ret)
> goto out_kfree_drv;
>
> + cpuidle_cooling_register(drv);
> +
> return 0;
>
> out_kfree_drv:
> diff --git a/drivers/cpuidle/cpuidle-psci.c b/drivers/cpuidle/cpuidle-psci.c
> index bae9140a65a5..1f38e0dfc9b2 100644
> --- a/drivers/cpuidle/cpuidle-psci.c
> +++ b/drivers/cpuidle/cpuidle-psci.c
> @@ -9,6 +9,7 @@
> #define pr_fmt(fmt) "CPUidle PSCI: " fmt
>
> #include <linux/cpuhotplug.h>
> +#include <linux/cpu_cooling.h>
> #include <linux/cpuidle.h>
> #include <linux/cpumask.h>
> #include <linux/cpu_pm.h>
> @@ -313,6 +314,8 @@ static int __init psci_idle_init_cpu(int cpu)
> if (ret)
> goto out_kfree_drv;
>
> + cpuidle_cooling_register(drv);
> +
> return 0;
>
> out_kfree_drv:
> --
> 2.17.1
>
Powered by blists - more mailing lists