summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/dvfs.c
diff options
context:
space:
mode:
authorPrashant Gaikwad <pgaikwad@nvidia.com>2012-08-16 19:11:32 +0530
committerRohan Somvanshi <rsomvanshi@nvidia.com>2012-09-18 07:14:57 -0700
commit149d6f2e5a5972bb0d785ff548534ea5809dfd7a (patch)
treea4a9db0742adf8549e2217309daec3421670bbb6 /arch/arm/mach-tegra/dvfs.c
parent7d02b8307bda47bb917b8da84e9300685e91eb6d (diff)
ARM: Tegra: Add support for T30 DVFS DT bindings
This patch implements functions required to parse DVFS tabled defined in device tree. Bug 906383 Change-Id: I13cf76b3a8c1284349d6684f91f62f011501c84d Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com> Reviewed-on: http://git-master/r/130671 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/dvfs.c')
-rw-r--r--arch/arm/mach-tegra/dvfs.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/dvfs.c b/arch/arm/mach-tegra/dvfs.c
index 4565ca0cd7db..b0180ed17d68 100644
--- a/arch/arm/mach-tegra/dvfs.c
+++ b/arch/arm/mach-tegra/dvfs.c
@@ -718,6 +718,26 @@ bool tegra_dvfs_rail_updating(struct clk *clk)
(clk->dvfs->dvfs_rail->updating))));
}
+#ifdef CONFIG_OF
+int __init of_tegra_dvfs_init(const struct of_device_id *matches)
+{
+ int ret;
+ struct device_node *np;
+
+ for_each_matching_node(np, matches) {
+ const struct of_device_id *match = of_match_node(matches, np);
+ of_tegra_dvfs_init_cb_t dvfs_init_cb = match->data;
+ ret = dvfs_init_cb(np);
+ if (ret) {
+ pr_err("dt: Failed to read %s tables from DT\n",
+ match->compatible);
+ return ret;
+ }
+ }
+ return 0;
+}
+#endif
+
/*
* Iterate through all the dvfs regulators, finding the regulator exported
* by the regulator api for each one. Must be called in late init, after