From patchwork Tue Nov 14 13:48:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastian Krause X-Patchwork-Id: 10057675 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 41F5C6023A for ; Tue, 14 Nov 2017 13:51:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 257F3298B5 for ; Tue, 14 Nov 2017 13:51:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 143D1298BF; Tue, 14 Nov 2017 13:51:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E66C2298B5 for ; Tue, 14 Nov 2017 13:48:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753855AbdKNNsk (ORCPT ); Tue, 14 Nov 2017 08:48:40 -0500 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:45901 "EHLO metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754333AbdKNNsf (ORCPT ); Tue, 14 Nov 2017 08:48:35 -0500 Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7] helo=dude.pengutronix.de.) by metis.ext.pengutronix.de with esmtp (Exim 4.84_2) (envelope-from ) id 1eEbZp-0004js-Aq; Tue, 14 Nov 2017 14:48:33 +0100 From: Bastian Stender To: Zhang Rui , Eduardo Valentin Cc: linux-pm@vger.kernel.org, Viresh Kumar , kernel@pengutronix.de, Bastian Stender Subject: [PATCH] thermal: imx: remove cooling device Date: Tue, 14 Nov 2017 14:48:29 +0100 Message-Id: <20171114134829.1354-1-bst@pengutronix.de> X-Mailer: git-send-email 2.11.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: bst@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-pm@vger.kernel.org Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The cooling device should not be part of the i.MX thermal code but rather in the i.MX cpufreq driver. So remove it here. Signed-off-by: Bastian Stender --- This is part of a rework of "thermal: imx: use cpufreq cooling of registration method" (id:20171103164203.5805-1-bst@pengutronix.de). "cpufreq: imx6q: add CPU as cooling device" will reintroduce the cooling device. --- drivers/thermal/imx_thermal.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c index 4798b4b1fd77..3bdbde675698 100644 --- a/drivers/thermal/imx_thermal.c +++ b/drivers/thermal/imx_thermal.c @@ -91,7 +91,6 @@ static struct thermal_soc_data thermal_imx6sx_data = { struct imx_thermal_data { struct cpufreq_policy *policy; struct thermal_zone_device *tz; - struct thermal_cooling_device *cdev; enum thermal_device_mode mode; struct regmap *tempmon; u32 c1, c2; /* See formula in imx_get_sensor_data() */ @@ -533,22 +532,12 @@ static int imx_thermal_probe(struct platform_device *pdev) return -EPROBE_DEFER; } - data->cdev = cpufreq_cooling_register(data->policy); - if (IS_ERR(data->cdev)) { - ret = PTR_ERR(data->cdev); - dev_err(&pdev->dev, - "failed to register cpufreq cooling device: %d\n", ret); - cpufreq_cpu_put(data->policy); - return ret; - } - data->thermal_clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(data->thermal_clk)) { ret = PTR_ERR(data->thermal_clk); if (ret != -EPROBE_DEFER) dev_err(&pdev->dev, "failed to get thermal clk: %d\n", ret); - cpufreq_cooling_unregister(data->cdev); cpufreq_cpu_put(data->policy); return ret; } @@ -563,7 +552,6 @@ static int imx_thermal_probe(struct platform_device *pdev) ret = clk_prepare_enable(data->thermal_clk); if (ret) { dev_err(&pdev->dev, "failed to enable thermal clk: %d\n", ret); - cpufreq_cooling_unregister(data->cdev); cpufreq_cpu_put(data->policy); return ret; } @@ -579,7 +567,6 @@ static int imx_thermal_probe(struct platform_device *pdev) dev_err(&pdev->dev, "failed to register thermal zone device %d\n", ret); clk_disable_unprepare(data->thermal_clk); - cpufreq_cooling_unregister(data->cdev); cpufreq_cpu_put(data->policy); return ret; } @@ -608,7 +595,6 @@ static int imx_thermal_probe(struct platform_device *pdev) dev_err(&pdev->dev, "failed to request alarm irq: %d\n", ret); clk_disable_unprepare(data->thermal_clk); thermal_zone_device_unregister(data->tz); - cpufreq_cooling_unregister(data->cdev); cpufreq_cpu_put(data->policy); return ret; } @@ -630,7 +616,6 @@ static int imx_thermal_remove(struct platform_device *pdev) clk_disable_unprepare(data->thermal_clk); thermal_zone_device_unregister(data->tz); - cpufreq_cooling_unregister(data->cdev); cpufreq_cpu_put(data->policy); return 0;