clk: add DT clock binding support
[deliverable/linux.git] / include / linux / clk.h
index ad5c43e8ae8ae7eeca38e0308aa7f77c41bfdc6d..8b70342e7e0b74f8c4444903a4fd1bfb777cd518 100644 (file)
@@ -310,4 +310,23 @@ struct clk *clk_get_sys(const char *dev_id, const char *con_id);
 int clk_add_alias(const char *alias, const char *alias_dev_name, char *id,
                        struct device *dev);
 
+struct device_node;
+struct of_phandle_args;
+
+#ifdef CONFIG_OF
+struct clk *of_clk_get(struct device_node *np, int index);
+struct clk *of_clk_get_by_name(struct device_node *np, const char *name);
+struct clk *of_clk_get_from_provider(struct of_phandle_args *clkspec);
+#else
+static inline struct clk *of_clk_get(struct device_node *np, int index)
+{
+       return NULL;
+}
+static inline struct clk *of_clk_get_by_name(struct device_node *np,
+                                            const char *name)
+{
+       return NULL;
+}
+#endif
+
 #endif
This page took 0.025883 seconds and 5 git commands to generate.