From mboxrd@z Thu Jan 1 00:00:00 1970 From: shawn.guo@linaro.org (Shawn Guo) Date: Mon, 28 Jan 2013 16:32:01 +0800 Subject: [PATCH] cpufreq: instantiate cpufreq-cpu0 as a platform_driver In-Reply-To: <7196597.b9sJl95POM@vostro.rjw.lan> References: <1359208550-16402-1-git-send-email-shawn.guo@linaro.org> <7196597.b9sJl95POM@vostro.rjw.lan> Message-ID: <20130128083159.GD31689@S2101-09.ap.freescale.net> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Sat, Jan 26, 2013 at 11:21:27PM +0100, Rafael J. Wysocki wrote: > On Saturday, January 26, 2013 09:55:50 PM Shawn Guo wrote: > > As multiplatform build is being adopted by more and more ARM platforms, > > initcall function should be used very carefully. For example, when > > GENERIC_CPUFREQ_CPU0 is built in the kernel, cpu0_cpufreq_driver_init() > > will be called on all the platforms to initialize cpufreq-cpu0 driver. > > > > To eliminate this undesired the effect, the patch changes cpufreq-cpu0 > > driver to have it instantiated as a platform_driver. Then it will only > > run on platforms that create the platform_device "cpufreq-cpu0". > > > > Along with the change, it also changes cpu_dev to be &pdev->dev, > > so that managed functions can start working, and module build gets > > supported too. > > > > Signed-off-by: Shawn Guo > > --- > > Rafael, > > > > The patch depends patch "power: export opp cpufreq functions". > > https://patchwork.kernel.org/patch/1847261/ > > That one should use EXPORT_SYMBOL_GPL() for exporting symbols, though. > When commit 80126ce (PM / OPP: Export symbols for module usage.) already exported a few symbols with EXPORT_SYMBOL()? > Care to add a fixed version to the patch set along with the $subject one? > > > AnilKumar, > > > > Unfortunately, the change will require some platform level adoption > > to have cpufreq-cpu0 driver continue working for am33xx. But it should > > be as simple as something like below. > > > > struct platform_device_info devinfo = { .name = "cpufreq-cpu0", }; > > platform_device_register_full(&devinfo); > > That should be included in your patch, then. > Fair enough. Will do. Shawn