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.smir...@gmail.com>
Cc: Chris Healy <cphe...@gmail.com>
Cc: Lucas Stach <l.st...@pengutronix.de>
Cc: Fabio Estevam <feste...@gmail.com>
Cc: Zhang Rui <rui.zh...@intel.com>
Cc: Eduardo Valentin <edubez...@gmail.com>
Cc: Daniel Lezcano <daniel.lezc...@linaro.org>
Cc: NXP Linux Team <linux-...@nxp.com>
Cc: linux...@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

Reply via email to