The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Daniel Lezcano <daniel.lezcano@linaro.org>, rui.zhang@intel.com
Cc: lukasz.luba@arm.com, Viresh Kumar <viresh.kumar@linaro.org>,
	Amit Daniel Kachhap <amit.kachhap@gmail.com>,
	Javi Merino <javi.merino@kernel.org>,
	Amit Kucheria <amit.kucheria@verdurent.com>,
	"open list:THERMAL/CPU_COOLING" <linux-pm@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Wasim Nazir <quic_wasimn@quicinc.com>
Subject: Re: [PATCH v4 3/4] thermal/drivers/cpuidle_cooling: Change the registration function
Date: Fri, 11 Apr 2025 22:14:14 +0200	[thread overview]
Message-ID: <321ddc86-6ead-4079-8b0b-6527f0badeb1@oss.qualcomm.com> (raw)
In-Reply-To: <20200429103644.5492-3-daniel.lezcano@linaro.org>

On 4/29/20 12:36 PM, Daniel Lezcano wrote:
> Today, there is no user for the cpuidle cooling device. The targetted
> platform is ARM and ARM64.
> 
> The cpuidle and the cpufreq cooling device are based on the device tree.
> 
> As the cpuidle cooling device can have its own configuration depending
> on the platform and the available idle states. The DT node description
> will give the optional properties to set the cooling device up.
> 
> Do no longer rely on the CPU node which is prone to error and will
> lead to a confusion in the DT because the cpufreq cooling device is
> also using it. Let initialize the cpuidle cooling device with the DT
> binding.

[...]


> -int cpuidle_cooling_register(struct cpuidle_driver *drv)
> +void cpuidle_cooling_register(struct cpuidle_driver *drv)
>  {
> -	return cpuidle_of_cooling_register(NULL, drv);
> +	struct device_node *cooling_node;
> +	struct device_node *cpu_node;
> +	int cpu, ret;
> +
> +	for_each_cpu(cpu, drv->cpumask) {
> +
> +		cpu_node = of_cpu_device_node_get(cpu);
> +
> +		cooling_node = of_get_child_by_name(cpu_node, "thermal-idle");
> +
> +		of_node_put(cpu_node);
> +
> +		if (!cooling_node) {
> +			pr_debug("'thermal-idle' node not found for cpu%d\n", cpu);
> +			continue;
> +		}
> +
> +		ret = __cpuidle_cooling_register(cooling_node, drv);
[5 years later, adding some folks & linux-arm-msm]

So this commit changed the driver so that idle injection cooling is
only initialized if the dt configuration is present - should we not
always register it, with some sane defaults?

Konrad

  parent reply	other threads:[~2025-04-11 20:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-29 10:36 [PATCH v4 1/4] powercap/drivers/idle_inject: Specify idle state max latency Daniel Lezcano
2020-04-29 10:36 ` [PATCH v4 2/4] dt-bindings: thermal: Add the idle cooling device Daniel Lezcano
2020-05-06  9:57   ` Amit Kucheria
2020-04-29 10:36 ` [PATCH v4 3/4] thermal/drivers/cpuidle_cooling: Change the registration function Daniel Lezcano
2020-04-29 20:00   ` Lukasz Luba
2020-05-06  9:57   ` Amit Kucheria
2025-04-11 20:14   ` Konrad Dybcio [this message]
2020-04-29 10:36 ` [PATCH v4 4/4] thermal: cpuidle: Register cpuidle cooling device Daniel Lezcano
2020-04-29 20:02   ` Lukasz Luba
2020-04-29 21:01     ` Daniel Lezcano
2020-05-04 18:00       ` Daniel Lezcano
2020-05-15  9:58         ` Sudeep Holla
2020-05-15 11:03           ` Daniel Lezcano
2020-05-06  9:57   ` Amit Kucheria
2020-06-15 11:25   ` Ulf Hansson
2020-05-06  9:56 ` [PATCH v4 1/4] powercap/drivers/idle_inject: Specify idle state max latency Amit Kucheria

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=321ddc86-6ead-4079-8b0b-6527f0badeb1@oss.qualcomm.com \
    --to=konrad.dybcio@oss.qualcomm.com \
    --cc=amit.kachhap@gmail.com \
    --cc=amit.kucheria@verdurent.com \
    --cc=andersson@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=javi.merino@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=quic_wasimn@quicinc.com \
    --cc=rui.zhang@intel.com \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox