From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755946AbbCCLeZ (ORCPT ); Tue, 3 Mar 2015 06:34:25 -0500 Received: from mail.kapsi.fi ([217.30.184.167]:36078 "EHLO mail.kapsi.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751369AbbCCLeX (ORCPT ); Tue, 3 Mar 2015 06:34:23 -0500 Message-ID: <54F59C16.2010401@kapsi.fi> Date: Tue, 03 Mar 2015 13:33:42 +0200 From: Mikko Perttunen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Paul Bolle CC: swarren@wwwdotorg.org, thierry.reding@gmail.com, gnurou@gmail.com, pdeschrijver@nvidia.com, rjw@rjwysocki.net, viresh.kumar@linaro.org, mturquette@linaro.org, pwalmsley@nvidia.com, vinceh@nvidia.com, pgaikwad@nvidia.com, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org, tuomas.tynkkynen@iki.fi, Tuomas Tynkkynen Subject: Re: [PATCH v8 15/18] cpufreq: Add cpufreq driver for Tegra124 References: <1425213881-5262-1-git-send-email-mikko.perttunen@kapsi.fi> <1425213881-5262-16-git-send-email-mikko.perttunen@kapsi.fi> <1425286186.24292.76.camel@x220> In-Reply-To: <1425286186.24292.76.camel@x220> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:708:30:12d0:beee:7bff:fe5b:f272 X-SA-Exim-Mail-From: mikko.perttunen@kapsi.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/02/2015 10:49 AM, Paul Bolle wrote: > On Sun, 2015-03-01 at 14:44 +0200, Mikko Perttunen wrote: >> --- a/drivers/cpufreq/Kconfig.arm >> +++ b/drivers/cpufreq/Kconfig.arm >> @@ -256,6 +256,13 @@ config ARM_TEGRA20_CPUFREQ >> help >> This adds the CPUFreq driver support for Tegra20 SOCs. >> >> +config ARM_TEGRA124_CPUFREQ >> + bool "Tegra124 CPUFreq support" > > This adds a bool Kconfig symbol... > >> + depends on ARCH_TEGRA && CPUFREQ_DT >> + default y >> + help >> + This adds the CPUFreq driver support for Tegra124 SOCs. >> + >> config ARM_PXA2xx_CPUFREQ >> tristate "Intel PXA2xx CPUfreq driver" >> depends on PXA27x || PXA25x >> diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile >> index 312d9c3..d478b83 100644 >> --- a/drivers/cpufreq/Makefile >> +++ b/drivers/cpufreq/Makefile >> @@ -77,6 +77,7 @@ obj-$(CONFIG_ARM_SA1100_CPUFREQ) += sa1100-cpufreq.o >> obj-$(CONFIG_ARM_SA1110_CPUFREQ) += sa1110-cpufreq.o >> obj-$(CONFIG_ARM_SPEAR_CPUFREQ) += spear-cpufreq.o >> obj-$(CONFIG_ARM_TEGRA20_CPUFREQ) += tegra20-cpufreq.o >> +obj-$(CONFIG_ARM_TEGRA124_CPUFREQ) += tegra124-cpufreq.o > > ... so this object will either not be built or be built-in. > >> obj-$(CONFIG_ARM_VEXPRESS_SPC_CPUFREQ) += vexpress-spc-cpufreq.o >> >> ################################################################################## >> diff --git a/drivers/cpufreq/tegra124-cpufreq.c b/drivers/cpufreq/tegra124-cpufreq.c >> new file mode 100644 >> index 0000000..45778ce >> --- /dev/null >> +++ b/drivers/cpufreq/tegra124-cpufreq.c >> @@ -0,0 +1,217 @@ >> +/* >> + * Tegra 124 cpufreq driver >> + * >> + * This software is licensed under the terms of the GNU General Public >> + * License version 2, as published by the Free Software Foundation, and >> + * may be copied, distributed, and modified under those terms. >> + * >> + * This program is distributed in the hope that it will be useful, >> + * but WITHOUT ANY WARRANTY; without even the implied warranty of >> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >> + * GNU General Public License for more details. >> + */ >> + >> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt >> + >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include > > Is linux/module.h needed? > >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include > > [...] > >> +static struct platform_driver tegra124_cpufreq_platdrv = { >> + .driver = { >> + .name = "cpufreq-tegra124", >> + .owner = THIS_MODULE, > > .owner will always be, in short, NULL. > >> + }, >> + .probe = tegra124_cpufreq_probe, >> + .remove = tegra124_cpufreq_remove, >> +}; > > [...] > >> +module_init(tegra_cpufreq_init); > > This might as well be, I think, device_initcall(). > >> +MODULE_AUTHOR("Tuomas Tynkkynen "); >> +MODULE_DESCRIPTION("cpufreq driver for NVIDIA Tegra124"); >> +MODULE_LICENSE("GPL v2"); > > The strings in these macros will always be preprocessed away, because > this driver cannot become a module. > > > Paul Bolle > Well noticed! I changed the config symbol to be tristate. Thanks, Mikko Perttunen