From patchwork Mon May 14 08:09:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 10397499 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 02092601E7 for ; Mon, 14 May 2018 08:21:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DF51D290C5 for ; Mon, 14 May 2018 08:21:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DDF6E290E6; Mon, 14 May 2018 08:21:11 +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=-2.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, DKIM_VALID, MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AFAF1290C5 for ; Mon, 14 May 2018 08:21:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=8uQhPgsRY2KPDmhSsTpyJuWyADzIhQnFyGeQUuKQGos=; b=ZpbUG+9StL4NC9 uNrcCtYJ3SDQ/dBQ9N3aDUSjBiLVb4BmU+kLqvd3XuS0Y9uHJ8Dy7UKeUX64A0QPR9fx9A9EwGjyM fy88DM+friLYmmqrlUp8M+Uq2mJTrFV+ADByvVhenYZwVtGgiof5o4UwlBrD6zCwNHAvg/TjU2kSb fclWV+BoSlLu/5ocnz1zhPGSB0+M5gVQ8ejDNJS2H7L6GLNhu+VvQOC3XVxC4xzbvgk3DzI6yhjs5 ESwxLSmcqkA52AohWOylNJCjpeQQKZpf0m64PHQErQjVSCEZj+F5XGUehn+doIlk+2xkkwcyvUy3b Kzvkla3RQV7QqxXiIjyw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fI8j4-0004a7-PA; Mon, 14 May 2018 08:20:58 +0000 Received: from mail-eopbgr20073.outbound.protection.outlook.com ([40.107.2.73] helo=EUR02-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fI8bm-0005o8-04 for linux-arm-kernel@lists.infradead.org; Mon, 14 May 2018 08:13:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=QpzEMAZro0nvdgTYHna396LWgviHrfLW0l7F0dT/D4Y=; b=oGVTUAymR+hNsbVZVe/4ASL/YoSoejzwN1wjkUlkTfb8QjK8NE8k+Mmrdnbv/czMkzEtRYpTmG3EsY4vW21ldlJUbZdrgRN8U+LTm5MqfFv4LI2pfmCGGHPoY01KAuyPEaFkzVn8dSx0+ZXRZXosvIkYXeUzRzWtcuX05OI4bjI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=anson.huang@nxp.com; Received: from anson-OptiPlex-790.ap.freescale.net (119.31.174.66) by HE1PR04MB1324.eurprd04.prod.outlook.com (2a01:111:e400:588a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.755.16; Mon, 14 May 2018 08:12:59 +0000 From: Anson Huang To: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, fabio.estevam@nxp.com, robh+dt@kernel.org, mark.rutland@arm.com, rjw@rjwysocki.net, viresh.kumar@linaro.org, rui.zhang@intel.com, edubezval@gmail.com Subject: [PATCH 1/3] thermal: imx: remove cpufreq cooling registration Date: Mon, 14 May 2018 16:09:17 +0800 Message-Id: <1526285359-17978-1-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: TY2PR01CA0013.jpnprd01.prod.outlook.com (2603:1096:404:a::25) To HE1PR04MB1324.eurprd04.prod.outlook.com (2a01:111:e400:588a::11) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(48565401081)(2017052603328)(7153060)(7193020); SRVR:HE1PR04MB1324; X-Microsoft-Exchange-Diagnostics: 1; HE1PR04MB1324; 3:Sf35Tv5GdE1xzoWtm2mQ5pCf7r5a8+56/gBEHnaQLnhH9AnNq92hwANzpDTAJ6/AxpioWdYoKZqY7pCDT1/hCsQR4w8hd3XozV7Onb0E+FaubI/Exj1ctfll7TwSQIrfvTXmWO228LgZGSA/SM0/Gqg+kbnv+pxYI6F903glKJs5JopSY5klCLA2srVyKyVta+Aksudxxgu7QK8rSkdbyq9znquBB+Qxa7xdvLRV8peJuhHsJBoFGbtQdwQq/mJh; 25:bQ0G/B7wma7sF8F4lyFQ0vT6x6MgU4Rm8DyQJmjmPfs5Cok4MAavG8q06iP2LBgE4SNifs+sXbI68pnv8KqVgjFtORJ0uPtQT9n41+AyXH/yLSm4EM5+HPIEFa/JQS+V+SvbL1r5TDJazwAZhZ5pL/IRiAqS7hv3cDN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NJ238R67/vXs8ZIMqeTKqNPlx5yU6+vSHrCnmdR0WX5sSrPpmC1o67+NC3nrjhcjT1LYN3TygAoELzVfnkc1WDz1Bi7kCoZz3gBHiBcVMr0mZYliSWa2GCtHq0c+rRjd3TezNGXuIrB35Q3Xz6H0OyujXV8L+RipgxPEIin1DMAB+ynvrKdkfbwX+Hft2+ftKQzw5BopfSwrszvYxhfSqbh1FbdxVKIFn5JgJK/a6w0RtjVMY72hhL X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(3231254)(944501410)(52105095)(10201501046)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(6072148)(201708071742011); SRVR:HE1PR04MB1324; BCL:0; PCL:0; RULEID:; SRVR:HE1PR04MB1324; X-Forefront-PRVS: 067270ECAF X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(346002)(376002)(39860400002)(39380400002)(396003)(199004)(189003)(316002)(2906002)(52116002)(7416002)(51416003)(6666003)(16586007)(5660300001)(25786009)(39060400002)(68736007)(6512007)(53936002)(4326008)(36756003)(97736004)(478600001)(6116002)(3846002)(106356001)(305945005)(105586002)(7736002)(386003)(6486002)(50226002)(47776003)(8936002)(66066001)(81156014)(81166006)(6506007)(8676002)(59450400001)(48376002)(50466002)(956004)(486006)(2616005)(26005)(476003)(16526019)(186003)(86362001)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR04MB1324; H:anson-OptiPlex-790.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:3; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-asc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U1OEH8vqK3wVvhzckY0fzkDrkjouicmVrFCNTzGOn3ZtxkQ0AdXKNwY38zUEiSYEcARW1oIbpMHw==; 5:REuHQ3RREWivSSbfjqIeJL9FzGTzwW98LJBkKZkCS4slpONKKAYbzCruCwVcLbciuw1LmHL7YU1KwD8N8EpAKddzFyXB9b6WoLh5BZgOIbANuE9ah2Hk2H5iL4ExxyFC2+IfPoZ0ruBNfRLm64dO8TdKNGJeHCaBR9XXE0nIen4=; 24:nJ4Vemd3VdycIv1EM6utw1OTJsdekfmQxePShryWUMoVEcjRIkVGZVQKiHGILzOFsg6l4nLEf8y8NLC5omfBe3YuKErOjp4n0CZykcRdHaQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR04MB1324; 7:AwmPZtR8shgoGhA7/SUzw5QMBaMOMoOoS/QlW+/VYmisXOGoG1RI08q0dnfNDhnqCP5tsxFhJUBSSxEW9PkZT7o6o1t0bPZb27KDr1abrIuS5m+E1C6ZATUUvZcdzKVeeFCL3VdwXfa/aNxFiLp+paXR5IDsfbpT17fQfaiLy28CQ7pJMPuJLlXklDdj8pp7VwMbtX7ofKJAN7ONq/kj/Yk8LbH5cyN9UHq1fYJLNaCyVf+ftEpqzvsCAraVUBrr X-MS-Office365-Filtering-Correlation-Id: d96d6636-ecbf-4434-817a-08d5b97284df X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 May 2018 08:12:59.0535 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d96d6636-ecbf-4434-817a-08d5b97284df X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR04MB1324 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180514_011326_376370_38EBF639 X-CRM114-Status: GOOD ( 12.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-pm@vger.kernel.org, Linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch removes cpufreq cooling registration in thermal .probe function, cpufreq cooling should be done in cpufreq driver when it is ready. Signed-off-by: Anson Huang Acked-by: Daniel Lezcano --- drivers/thermal/imx_thermal.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c index c30dc21..8eedb97 100644 --- a/drivers/thermal/imx_thermal.c +++ b/drivers/thermal/imx_thermal.c @@ -9,7 +9,6 @@ #include #include -#include #include #include #include @@ -207,7 +206,6 @@ static struct thermal_soc_data thermal_imx7d_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_init_calib() */ @@ -729,22 +727,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; } @@ -759,7 +747,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; } @@ -775,7 +762,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; } @@ -811,7 +797,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; } @@ -831,7 +816,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;