From: Viresh Kumar <viresh.kumar@linaro.org>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: edubezval@gmail.com, linux-kernel@vger.kernel.org,
Sudeep Holla <sudeep.holla@arm.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Amit Daniel Kachhap <amit.kachhap@gmail.com>,
Javi Merino <javi.merino@kernel.org>,
Zhang Rui <rui.zhang@intel.com>, Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
NXP Linux Team <linux-imx@nxp.com>, Keerthy <j-keerthy@ti.com>,
"open list:CPU FREQUENCY DRIVERS - ARM BIG LITTLE"
<linux-pm@vger.kernel.org>,
"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
<linux-arm-kernel@lists.infradead.org>,
"open list:TI BANDGAP AND THERMAL DRIVER"
<linux-omap@vger.kernel.org>
Subject: Re: [PATCH 2/6] thermal/drivers/cpu_cooling: Unregister with the policy
Date: Mon, 24 Jun 2019 15:09:37 +0530 [thread overview]
Message-ID: <20190624093937.hmfzfm2s46hfhvhm@vireshk-i7> (raw)
In-Reply-To: <d31f65c8-53df-ae59-5f6f-211c0ddcff3f@linaro.org>
On 24-06-19, 09:45, Daniel Lezcano wrote:
> Actually I'm asking your opinion :)
>
> The structure in drivers/thermal/imx_thermal.c
>
> struct imx_thermal_data {
> struct cpufreq_policy *policy; <<<< in the thermal data ?!
> [ ... ]
> };
>
> And then:
>
> #ifdef CONFIG_CPU_FREQ
> /*
> * Create cooling device in case no #cooling-cells property is available in
> * CPU node
> */
> static int imx_thermal_register_legacy_cooling(struct imx_thermal_data
> *data)
> {
> struct device_node *np;
> int ret;
>
> data->policy = cpufreq_cpu_get(0);
> if (!data->policy) {
> pr_debug("%s: CPUFreq policy not found\n", __func__);
> return -EPROBE_DEFER;
> }
>
> np = of_get_cpu_node(data->policy->cpu, NULL);
>
> if (!np || !of_find_property(np, "#cooling-cells", NULL)) {
> data->cdev = cpufreq_cooling_register(data->policy);
> if (IS_ERR(data->cdev)) {
> ret = PTR_ERR(data->cdev);
> cpufreq_cpu_put(data->policy);
> return ret;
> }
> }
>
> return 0;
> }
>
> [ ... ]
>
> Shouldn't this be move in the drivers/cpufreq/<whatever driver> ?
Sure, we have platform specific drivers where this can be moved :)
--
viresh
next prev parent reply other threads:[~2019-06-24 9:39 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-21 13:22 [PATCH 1/6] cpufreq: Use existing stub functions instead of IS_ENABLED macro Daniel Lezcano
2019-06-21 13:22 ` [PATCH 2/6] thermal/drivers/cpu_cooling: Unregister with the policy Daniel Lezcano
2019-06-24 6:03 ` Viresh Kumar
2019-06-24 7:30 ` Daniel Lezcano
2019-06-24 7:37 ` Viresh Kumar
2019-06-24 7:45 ` Daniel Lezcano
2019-06-24 9:39 ` Viresh Kumar [this message]
2019-06-21 13:22 ` [PATCH 3/6] cpufreq/drivers/arm_big_little: Remove cooling device usage Daniel Lezcano
2019-06-24 6:04 ` Viresh Kumar
2019-06-21 13:23 ` [PATCH 4/6] cpufreq: " Daniel Lezcano
2019-06-24 6:05 ` Viresh Kumar
2019-06-21 13:23 ` [PATCH 5/6] thermal/drivers/imx: " Daniel Lezcano
2019-06-24 6:06 ` Viresh Kumar
2019-06-21 13:23 ` [PATCH 6/6] thermal/drivers/ti: " Daniel Lezcano
2019-06-24 6:06 ` Viresh Kumar
2019-06-22 9:12 ` [PATCH 1/6] cpufreq: Use existing stub functions instead of IS_ENABLED macro Rafael J. Wysocki
2019-06-24 9:22 ` Daniel Lezcano
2019-06-24 9:30 ` Rafael J. Wysocki
2019-06-24 9:37 ` Daniel Lezcano
2019-06-24 8:53 ` Daniel Lezcano
2019-06-24 9:00 ` Rafael J. Wysocki
2019-06-24 9:07 ` Daniel Lezcano
2019-06-24 9:08 ` Viresh Kumar
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=20190624093937.hmfzfm2s46hfhvhm@vireshk-i7 \
--to=viresh.kumar@linaro.org \
--cc=amit.kachhap@gmail.com \
--cc=daniel.lezcano@linaro.org \
--cc=edubezval@gmail.com \
--cc=festevam@gmail.com \
--cc=j-keerthy@ti.com \
--cc=javi.merino@kernel.org \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=rui.zhang@intel.com \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=sudeep.holla@arm.com \
/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;
as well as URLs for NNTP newsgroup(s).