summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-msm/clock-pcom.c
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2013-06-17 10:43:18 -0700
committerDavid Brown <davidb@codeaurora.org>2013-06-24 13:07:53 -0700
commit421faca0b538d1ed5f2065cbbc6bbec38f49a54f (patch)
treecedbfa77fe9d4af303684b80fb8bb84e6c76f22c /arch/arm/mach-msm/clock-pcom.c
parent2dfd9c1f7722bcaa9d2d4af090af2050df85203b (diff)
ARM: msm: Make proc_comm clock control into a platform driver
To move closer to the generic struct clock framework move the proc_comm based clock code to a platform driver. The data describing the struct clks still live in the devices-$ARCH file, but the clock initialization is done at driver binding time. Cc: Saravana Kannan <skannan@codeaurora.org> Reviewed-by: Pankaj Jangra <jangra.pankaj9@gmail.com> Acked-by: Mike Turquette <mturquette@linaro.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: David Brown <davidb@codeaurora.org>
Diffstat (limited to 'arch/arm/mach-msm/clock-pcom.c')
-rw-r--r--arch/arm/mach-msm/clock-pcom.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/arch/arm/mach-msm/clock-pcom.c b/arch/arm/mach-msm/clock-pcom.c
index bb75f8e75ce..632173186a6 100644
--- a/arch/arm/mach-msm/clock-pcom.c
+++ b/arch/arm/mach-msm/clock-pcom.c
@@ -14,8 +14,9 @@
*/
#include <linux/err.h>
-#include <linux/ctype.h>
-#include <linux/stddef.h>
+#include <linux/platform_device.h>
+#include <linux/module.h>
+
#include <mach/clk.h>
#include "proc_comm.h"
@@ -126,3 +127,21 @@ struct clk_ops clk_ops_pcom = {
.round_rate = pc_clk_round_rate,
.is_local = pc_clk_is_local,
};
+
+static int msm_clock_pcom_probe(struct platform_device *pdev)
+{
+ const struct pcom_clk_pdata *pdata = pdev->dev.platform_data;
+ msm_clock_init(pdata->lookup, pdata->num_lookups);
+ return 0;
+}
+
+static struct platform_driver msm_clock_pcom_driver = {
+ .probe = msm_clock_pcom_probe,
+ .driver = {
+ .name = "msm-clock-pcom",
+ .owner = THIS_MODULE,
+ },
+};
+module_platform_driver(msm_clock_pcom_driver);
+
+MODULE_LICENSE("GPL v2");