From patchwork Mon Feb 29 16:04:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 8455461 Return-Path: X-Original-To: patchwork-linux-mediatek@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 41D409F52D for ; Mon, 29 Feb 2016 16:05:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 670B72021B for ; Mon, 29 Feb 2016 16:05:20 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7E5BA20212 for ; Mon, 29 Feb 2016 16:05:19 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aaQJz-000505-2G; Mon, 29 Feb 2016 16:05:19 +0000 Received: from mout.kundenserver.de ([212.227.17.24]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aaQJg-00041Q-CN; Mon, 29 Feb 2016 16:05:02 +0000 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue103) with ESMTPA (Nemesis) id 0MLiSZ-1abFep14Sp-000qCF; Mon, 29 Feb 2016 17:04:36 +0100 From: Arnd Bergmann To: "Rafael J. Wysocki" , Viresh Kumar Subject: [PATCH 2/2] cpufreq: mediatek: allow building as a module Date: Mon, 29 Feb 2016 17:04:21 +0100 Message-Id: <1456761867-1742824-2-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1456761867-1742824-1-git-send-email-arnd@arndb.de> References: <1456761867-1742824-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:SSsyZ9+SQiRkE9r9O2NSMtsvxvhqkLnMj/FaxmmVHLNl0Yl/PY5 coWwLvsWMwWDgE7NCoEXTz6YR6X1xByqWt1VSSoB4HdJkUKEP/hdkOmooRmym8EL3bdZ8+c w0JrkgLIYXaqvhqfIzCmouqaRME0Vg5WndvDS5nqSUBZrxs3kp9WHcQlAHpohD6bn/+0Vmr VEInVzS2SYOtT9sNnSNSQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:1Bdb7fV7j6k=:uKECGk7gq/5y6Qd91s+Bew S2ALzsK1kNGahpJijnnbHkoGb04NZVIIFjrUJ8B74rd2G3Rr7xgaLubwHGh4YQ1jqsuYJTuR3 BzYby1r8dWn1g6GqCSgfnsLo0LTsUn3yy5PIji1oaqwVXNquJjt7oY4U0PoiOpC2K8aKcmMU7 LpSldtSTaTrvoD4w7HjNnqS9lL3e+dWRVxAENhEWIilLQHkQ6H5djg2q1/ql4acPgCQtDfkcy qhKCMK6+IG424Lw0PdFJIObTneakA5O0eb9vtwb/6mbe7kmmXwJ0kyAzgyRflE2v02UzqbbM0 up3mBgTYVVFmSzGkA6t1eYmEvXCPLs+bEJbvrnASUERlJt59NT5JdRCEuFzSVajxd2Mbytyod k8C5srz6UBkS7wSZDafKOhphhwEQxz8EEmJmLMR124+OYA+LMcVoDMSgaZcNB6Qp39BdGclmT lkNOHCdeTJ/e1RVNis4YlMZB9ava9P9uSkkRe+uz6qKeo6r2pOaghq6N/4VptsbC3ixqogfol KH2FnHQ+y+dVULUT1vs9kJtlfZ1u8WRmmoZrclxTVskKZRwLzxVJfQuUQPwSFs6wGftWZfCZh i8ZbDt0o4Yrbu+mktgbUrlFSHDBg+Y6BCo7yNNKmPyFRwXrm98MxOFSHBLx99CTXPICMaDUex acHinm9bOi4EWRvgMZE62Ond/fEj+RzEl2Ve7qM8nZ8o8ULYcZ68MmX1SW/91tc3pEj0= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160229_080500_958792_D3866760 X-CRM114-Status: GOOD ( 14.49 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, Matthias Brugger , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The MT8173 cpufreq driver can currently only be built-in, but it has a Kconfig dependency on the thermal core. THERMAL can be a loadable module, which in turn makes this driver impossible to build. It is nicer to make the cpufreq driver a module as well, so this patch turns the option in to a 'tristate' and adapts the dependency accordingly. The driver has no module_exit() function, so it will continue to not support unloading, but it can be built as a module and loaded at runtime now. Signed-off-by: Arnd Bergmann Fixes: 5269e7067cd6 ("cpufreq: Add ARM_MT8173_CPUFREQ dependency on THERMAL") Reviewed-by: Matthias Brugger --- drivers/cpufreq/Kconfig.arm | 4 ++-- drivers/cpufreq/mt8173-cpufreq.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm index 0031069b64c9..14b1f9393b05 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm @@ -84,10 +84,10 @@ config ARM_KIRKWOOD_CPUFREQ SoCs. config ARM_MT8173_CPUFREQ - bool "Mediatek MT8173 CPUFreq support" + tristate "Mediatek MT8173 CPUFreq support" depends on ARCH_MEDIATEK && REGULATOR depends on ARM64 || (ARM_CPU_TOPOLOGY && COMPILE_TEST) - depends on !CPU_THERMAL || THERMAL=y + depends on !CPU_THERMAL || THERMAL select PM_OPP help This adds the CPUFreq driver support for Mediatek MT8173 SoC. diff --git a/drivers/cpufreq/mt8173-cpufreq.c b/drivers/cpufreq/mt8173-cpufreq.c index 1efba340456d..2058e6d292ce 100644 --- a/drivers/cpufreq/mt8173-cpufreq.c +++ b/drivers/cpufreq/mt8173-cpufreq.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include