thermal: imx: skip registering legacy cooling on i.MX7
diff mbox series

Message ID 20190614074140.15276-1-andrew.smirnov@gmail.com
State Accepted
Delegated to: Eduardo Valentin
Headers show
Series
  • thermal: imx: skip registering legacy cooling on i.MX7
Related show

Commit Message

Andrey Smirnov June 14, 2019, 7:41 a.m. UTC
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(+)

Comments

Fabio Estevam June 18, 2019, 10:36 p.m. UTC | #1
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>

Patch
diff mbox series

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__);