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: 102643 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp1333290lbc; Mon, 29 Feb 2016 08:05:21 -0800 (PST) X-Received: by 10.98.71.147 with SMTP id p19mr23186551pfi.165.1456761921365; Mon, 29 Feb 2016 08:05:21 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id li15si43789590pab.113.2016.02.29.08.05.21; Mon, 29 Feb 2016 08:05:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755891AbcB2QFH (ORCPT + 11 others); Mon, 29 Feb 2016 11:05:07 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:55084 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755692AbcB2QFE (ORCPT ); Mon, 29 Feb 2016 11:05:04 -0500 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 Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Matthias Brugger , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org 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= Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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") --- drivers/cpufreq/Kconfig.arm | 4 ++-- drivers/cpufreq/mt8173-cpufreq.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) -- 2.7.0 -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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