[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <321ddc86-6ead-4079-8b0b-6527f0badeb1@oss.qualcomm.com>
Date: Fri, 11 Apr 2025 22:14:14 +0200
From: Konrad Dybcio <konrad.dybcio@....qualcomm.com>
To: Daniel Lezcano <daniel.lezcano@...aro.org>, rui.zhang@...el.com
Cc: lukasz.luba@....com, Viresh Kumar <viresh.kumar@...aro.org>,
Amit Daniel Kachhap <amit.kachhap@...il.com>,
Javi Merino <javi.merino@...nel.org>,
Amit Kucheria <amit.kucheria@...durent.com>,
"open list:THERMAL/CPU_COOLING" <linux-pm@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>,
linux-arm-msm <linux-arm-msm@...r.kernel.org>,
Bjorn Andersson <andersson@...nel.org>,
Wasim Nazir <quic_wasimn@...cinc.com>
Subject: Re: [PATCH v4 3/4] thermal/drivers/cpuidle_cooling: Change the
registration function
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
Powered by blists - more mailing lists