linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] thermal: imx: skip registering legacy cooling on i.MX7
@ 2019-06-14  7:41 Andrey Smirnov
  2019-06-18 22:36 ` Fabio Estevam
  0 siblings, 1 reply; 2+ messages in thread
From: Andrey Smirnov @ 2019-06-14  7:41 UTC (permalink / raw)
  Cc: Andrey Smirnov, Chris Healy, Lucas Stach, Fabio Estevam,
	Zhang Rui, Eduardo Valentin, Daniel Lezcano, NXP Linux Team,
	linux-pm, linux-kernel

i.MX7 doesn't have a mainline cpufreq driver, so
imx_thermal_register_legacy_cooling() will always return -EPROBE_DEFER
preventing the driver probe from finishing. No-op
imx_thermal_register_legacy_cooling() on i.MX7 to avoid that problem.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: Chris Healy <cphealy@gmail.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: NXP Linux Team <linux-imx@nxp.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/thermal/imx_thermal.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c
index bb6754a5342c..bfc9c6d57916 100644
--- a/drivers/thermal/imx_thermal.c
+++ b/drivers/thermal/imx_thermal.c
@@ -658,6 +658,9 @@ static int imx_thermal_register_legacy_cooling(struct imx_thermal_data *data)
 	struct device_node *np;
 	int ret;
 
+	if (data->socdata->version == TEMPMON_IMX7D)
+		return 0;
+
 	data->policy = cpufreq_cpu_get(0);
 	if (!data->policy) {
 		pr_debug("%s: CPUFreq policy not found\n", __func__);
-- 
2.21.0


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

* Re: [PATCH] thermal: imx: skip registering legacy cooling on i.MX7
  2019-06-14  7:41 [PATCH] thermal: imx: skip registering legacy cooling on i.MX7 Andrey Smirnov
@ 2019-06-18 22:36 ` Fabio Estevam
  0 siblings, 0 replies; 2+ messages in thread
From: Fabio Estevam @ 2019-06-18 22:36 UTC (permalink / raw)
  To: Andrey Smirnov
  Cc: Chris Healy, Lucas Stach, Zhang Rui, Eduardo Valentin,
	Daniel Lezcano, NXP Linux Team, linux-pm, linux-kernel

Hi Andrey,

On Fri, Jun 14, 2019 at 4:41 AM Andrey Smirnov <andrew.smirnov@gmail.com> wrote:
>
> i.MX7 doesn't have a mainline cpufreq driver, so

i.MX7 uses the generic cpufreq-dt driver since commit:

commit e3526f004a35e5f324b1c835bca056f4df05bff0
Author: Bai Ping <b51503@freescale.com>
Date:   Tue Nov 24 18:25:16 2015 +0800

    ARM: imx: enable cpufreq device on i.mx7d

    Add a cpufreq-dt device on i.MX7D, using the
    generic cpufreq-dt for CPU frequency scaling.

    Signed-off-by: Bai Ping <b51503@freescale.com>
    Acked-by: Lucas Stach <l.stach@pengutronix.de>
    Signed-off-by: Shawn Guo <shawnguo@kernel.org>

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

end of thread, other threads:[~2019-06-18 22:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-14  7:41 [PATCH] thermal: imx: skip registering legacy cooling on i.MX7 Andrey Smirnov
2019-06-18 22:36 ` Fabio Estevam

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).