summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2014-06-18 17:29:32 +0200
committerChanho Park <chanho61.park@samsung.com>2014-08-13 15:36:14 +0900
commiteda10f2624ebf74548e324db5ba6d8c80ab94835 (patch)
tree424235fc54ea26e8ac97a01d6c74a0b74bad7cfc /include
parent828340e880afd93c357c3851803e4b8c60fca8ff (diff)
downloadlinux-3.10-eda10f2624ebf74548e324db5ba6d8c80ab94835.tar.gz
linux-3.10-eda10f2624ebf74548e324db5ba6d8c80ab94835.tar.bz2
linux-3.10-eda10f2624ebf74548e324db5ba6d8c80ab94835.zip
clk: Support for clock parents and rates assigned from device tree
This patch adds helper functions to configure clock parents and rates as specified through 'assigned-clock-parents', 'assigned-clock-rates' DT properties for a clock provider or clock consumer device. The helpers are now being called by the bus code for the platform, I2C and SPI busses, before the driver probing and also in the clock core after registration of a clock provider. Change-Id: I96d98c9c9d576fcbf0dfc90d1cc75feb9fdf97cb Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> [s.nawrocki@samsung.com: backported to v3.10] Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/clk/clk-conf.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/clk/clk-conf.h b/include/linux/clk/clk-conf.h
new file mode 100644
index 00000000000..f3050e15f83
--- /dev/null
+++ b/include/linux/clk/clk-conf.h
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2014 Samsung Electronics Co., Ltd.
+ * Sylwester Nawrocki <s.nawrocki@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+struct device_node;
+
+#if defined(CONFIG_OF) && defined(CONFIG_COMMON_CLK)
+int of_clk_set_defaults(struct device_node *node, bool clk_supplier);
+#else
+static inline int of_clk_set_defaults(struct device_node *node,
+ bool clk_supplier)
+{
+ return 0;
+}
+#endif