Linux Tegra architecture development
 help / color / mirror / Atom feed
* [PATCH] cpufreq: tegra194: Enable CPUFREQ thermal cooling
@ 2023-01-24 11:53 Jon Hunter
  2023-01-25  3:56 ` Viresh Kumar
  0 siblings, 1 reply; 2+ messages in thread
From: Jon Hunter @ 2023-01-24 11:53 UTC (permalink / raw)
  To: Rafael J . Wysocki, Viresh Kumar, Thierry Reding
  Cc: linux-pm, linux-tegra, Yi-Wei Wang, Jon Hunter

From: Yi-Wei Wang <yiweiw@nvidia.com>

Populate the flag CPUFREQ_IS_COOLING_DEV for the Tegra194 CPUFREQ driver
to register it as a cooling device. This enables CPU frequency
throttling for CPUs when the passive trip points are crossed.

Signed-off-by: Yi-Wei Wang <yiweiw@nvidia.com>
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
 drivers/cpufreq/tegra194-cpufreq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/cpufreq/tegra194-cpufreq.c b/drivers/cpufreq/tegra194-cpufreq.c
index 4596c3e323aa..5890e25d7f77 100644
--- a/drivers/cpufreq/tegra194-cpufreq.c
+++ b/drivers/cpufreq/tegra194-cpufreq.c
@@ -411,7 +411,8 @@ static int tegra194_cpufreq_set_target(struct cpufreq_policy *policy,
 
 static struct cpufreq_driver tegra194_cpufreq_driver = {
 	.name = "tegra194",
-	.flags = CPUFREQ_CONST_LOOPS | CPUFREQ_NEED_INITIAL_FREQ_CHECK,
+	.flags = CPUFREQ_CONST_LOOPS | CPUFREQ_NEED_INITIAL_FREQ_CHECK |
+		 CPUFREQ_IS_COOLING_DEV,
 	.verify = cpufreq_generic_frequency_table_verify,
 	.target_index = tegra194_cpufreq_set_target,
 	.get = tegra194_get_speed,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] cpufreq: tegra194: Enable CPUFREQ thermal cooling
  2023-01-24 11:53 [PATCH] cpufreq: tegra194: Enable CPUFREQ thermal cooling Jon Hunter
@ 2023-01-25  3:56 ` Viresh Kumar
  0 siblings, 0 replies; 2+ messages in thread
From: Viresh Kumar @ 2023-01-25  3:56 UTC (permalink / raw)
  To: Jon Hunter
  Cc: Rafael J . Wysocki, Thierry Reding, linux-pm, linux-tegra,
	Yi-Wei Wang

On 24-01-23, 11:53, Jon Hunter wrote:
> From: Yi-Wei Wang <yiweiw@nvidia.com>
> 
> Populate the flag CPUFREQ_IS_COOLING_DEV for the Tegra194 CPUFREQ driver
> to register it as a cooling device. This enables CPU frequency
> throttling for CPUs when the passive trip points are crossed.
> 
> Signed-off-by: Yi-Wei Wang <yiweiw@nvidia.com>
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> ---
>  drivers/cpufreq/tegra194-cpufreq.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/tegra194-cpufreq.c b/drivers/cpufreq/tegra194-cpufreq.c
> index 4596c3e323aa..5890e25d7f77 100644
> --- a/drivers/cpufreq/tegra194-cpufreq.c
> +++ b/drivers/cpufreq/tegra194-cpufreq.c
> @@ -411,7 +411,8 @@ static int tegra194_cpufreq_set_target(struct cpufreq_policy *policy,
>  
>  static struct cpufreq_driver tegra194_cpufreq_driver = {
>  	.name = "tegra194",
> -	.flags = CPUFREQ_CONST_LOOPS | CPUFREQ_NEED_INITIAL_FREQ_CHECK,
> +	.flags = CPUFREQ_CONST_LOOPS | CPUFREQ_NEED_INITIAL_FREQ_CHECK |
> +		 CPUFREQ_IS_COOLING_DEV,
>  	.verify = cpufreq_generic_frequency_table_verify,
>  	.target_index = tegra194_cpufreq_set_target,
>  	.get = tegra194_get_speed,

Applied. Thanks.

-- 
viresh

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-25  3:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-24 11:53 [PATCH] cpufreq: tegra194: Enable CPUFREQ thermal cooling Jon Hunter
2023-01-25  3:56 ` Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox