linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] DT clock binding support
@ 2012-04-09 20:24 Rob Herring
  2012-04-09 20:24 ` [PATCH 1/4] clk: select CLKDEV_LOOKUP for COMMON_CLK Rob Herring
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Rob Herring @ 2012-04-09 20:24 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel, devicetree-discuss
  Cc: Thierry Reding, Mike Turquette, Sascha Hauer, Grant Likely,
	shawn.guo, Rob Herring

From: Rob Herring <rob.herring@calxeda.com>

This is yet another post of DT clock binding support. This adds support for
parsing clock data from DT and initializing clock trees using the common
clk infrastructure.

Functionally, this is mostly unchanged from the previous version. The major
change is the move of everything from drivers/of/clock.c and of_clk.h into
appropriate places in the core clock infrastructure. I've also squashed my
changes into Grant's original patches.

The highbank clock support is unchanged except for includes, so I have not
reposted it here.

The previous series is here:
http://www.spinics.net/lists/arm-kernel/msg164892.html

Rob

Grant Likely (2):
  clk: add DT clock binding support
  clk: add DT fixed-clock binding support

Rob Herring (2):
  clk: select CLKDEV_LOOKUP for COMMON_CLK
  clk: remove trailing whitespace from clk.h

 .../devicetree/bindings/clock/clock-bindings.txt   |  117 ++++++++++++++++
 .../devicetree/bindings/clock/fixed-clock.txt      |   22 +++
 drivers/clk/Kconfig                                |    1 +
 drivers/clk/clk-fixed-rate.c                       |   23 ++++
 drivers/clk/clk.c                                  |  140 ++++++++++++++++++++
 drivers/clk/clkdev.c                               |   77 +++++++++++
 include/linux/clk-provider.h                       |   16 +++
 include/linux/clk.h                                |   23 +++-
 8 files changed, 417 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/clock-bindings.txt
 create mode 100644 Documentation/devicetree/bindings/clock/fixed-clock.txt

-- 
1.7.5.4


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/4] clk: select CLKDEV_LOOKUP for COMMON_CLK
  2012-04-09 20:24 [PATCH 0/4] DT clock binding support Rob Herring
@ 2012-04-09 20:24 ` Rob Herring
  2012-04-15  3:18   ` Rob Herring
  2012-04-17 22:13   ` Turquette, Mike
  2012-04-09 20:24 ` [PATCH 2/4] clk: remove trailing whitespace from clk.h Rob Herring
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 16+ messages in thread
From: Rob Herring @ 2012-04-09 20:24 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel, devicetree-discuss
  Cc: Thierry Reding, Mike Turquette, Sascha Hauer, Grant Likely,
	shawn.guo, Rob Herring

From: Rob Herring <rob.herring@calxeda.com>

Using the common clock infrastructure without the common clkdev code makes
little sense, so select CLKDEV_LOOKUP for COMMON_CLK.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
 drivers/clk/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index 165e1fe..f05a60d 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -12,6 +12,7 @@ config HAVE_MACH_CLKDEV
 config COMMON_CLK
 	bool
 	select HAVE_CLK_PREPARE
+	select CLKDEV_LOOKUP
 	---help---
 	  The common clock framework is a single definition of struct
 	  clk, useful across many platforms, as well as an
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 2/4] clk: remove trailing whitespace from clk.h
  2012-04-09 20:24 [PATCH 0/4] DT clock binding support Rob Herring
  2012-04-09 20:24 ` [PATCH 1/4] clk: select CLKDEV_LOOKUP for COMMON_CLK Rob Herring
@ 2012-04-09 20:24 ` Rob Herring
  2012-04-19 20:06   ` Turquette, Mike
  2012-04-09 20:25 ` [PATCH 3/4] clk: add DT clock binding support Rob Herring
  2012-04-09 20:25 ` [PATCH 4/4] clk: add DT fixed-clock " Rob Herring
  3 siblings, 1 reply; 16+ messages in thread
From: Rob Herring @ 2012-04-09 20:24 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel, devicetree-discuss
  Cc: Thierry Reding, Mike Turquette, Sascha Hauer, Grant Likely,
	shawn.guo, Rob Herring

From: Rob Herring <rob.herring@calxeda.com>

Remove trailing whitespace from 2 lines.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
 include/linux/clk.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/clk.h b/include/linux/clk.h
index b025272..e08bff1 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -220,7 +220,7 @@ void clk_put(struct clk *clk);
  * Returns rounded clock rate in Hz, or negative errno.
  */
 long clk_round_rate(struct clk *clk, unsigned long rate);
- 
+
 /**
  * clk_set_rate - set the clock rate for a clock source
  * @clk: clock source
@@ -229,7 +229,7 @@ long clk_round_rate(struct clk *clk, unsigned long rate);
  * Returns success (0) or negative errno.
  */
 int clk_set_rate(struct clk *clk, unsigned long rate);
- 
+
 /**
  * clk_set_parent - set the parent clock source for this clock
  * @clk: clock source
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 3/4] clk: add DT clock binding support
  2012-04-09 20:24 [PATCH 0/4] DT clock binding support Rob Herring
  2012-04-09 20:24 ` [PATCH 1/4] clk: select CLKDEV_LOOKUP for COMMON_CLK Rob Herring
  2012-04-09 20:24 ` [PATCH 2/4] clk: remove trailing whitespace from clk.h Rob Herring
@ 2012-04-09 20:25 ` Rob Herring
  2012-04-10  2:19   ` Shawn Guo
                     ` (2 more replies)
  2012-04-09 20:25 ` [PATCH 4/4] clk: add DT fixed-clock " Rob Herring
  3 siblings, 3 replies; 16+ messages in thread
From: Rob Herring @ 2012-04-09 20:25 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel, devicetree-discuss
  Cc: Thierry Reding, Mike Turquette, Sascha Hauer, Grant Likely,
	shawn.guo, Rob Herring, Mike Turquette

From: Grant Likely <grant.likely@secretlab.ca>

Based on work 1st by Ben Herrenschmidt and Jeremy Kerr, then by Grant
Likely, this patch adds support to clk_get to allow drivers to retrieve
clock data from the device tree.

Platforms scan for clocks in DT with of_clk_init and a match table, and
the register a provider through of_clk_add_provider. The provider's
clk_src_get function will be called when a device references the
provider's OF node for a clock reference.

v5 (Rob Herring):
    - Move from drivers/of into common clock subsystem
    - Squashed "dt/clock: add a simple provider get function" and
      "dt/clock: add function to get parent clock name"
    - Rebase to 3.4-rc1
    - Drop CONFIG_OF_CLOCK and just use CONFIG_OF
    - Add missing EXPORT_SYMBOL to various functions
    - s/clock-output-name/clock-output-names/
    - Define that fixed-clock binding is a single output

v4 (Rob Herring):
    - Rework for common clk subsystem
    - Add of_clk_get_parent_name function

v3: - Clarified documentation

v2: - fixed errant ';' causing compile error
    - Editorial fixes from Shawn Guo
    - merged in adding lookup to clkdev
    - changed property names to match established convention. After
      working with the binding a bit it really made more sense to follow the
      lead of 'reg', 'gpios' and 'interrupts' by making the input simply
      'clocks' & 'clock-names' instead of 'clock-input-*', and to only use
      clock-output* for the producer nodes. (Sorry Shawn, this will mean
      you need to change some code, but it should be trivial)
    - Add ability to inherit clocks from parent nodes by using an empty
      'clock-ranges' property.  Useful for busses.  I could use some feedback
      on the new property name, 'clock-ranges' doesn't feel right to me.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Reviewed-by: Shawn Guo <shawn.guo@freescale.com>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Mike Turquette <mturquette@ti.com>
---
 .../devicetree/bindings/clock/clock-bindings.txt   |  117 ++++++++++++++++
 .../devicetree/bindings/clock/fixed-clock.txt      |   22 +++
 drivers/clk/clk.c                                  |  140 ++++++++++++++++++++
 drivers/clk/clkdev.c                               |   77 +++++++++++
 include/linux/clk-provider.h                       |   14 ++
 include/linux/clk.h                                |   19 +++
 6 files changed, 389 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/clock-bindings.txt
 create mode 100644 Documentation/devicetree/bindings/clock/fixed-clock.txt

diff --git a/Documentation/devicetree/bindings/clock/clock-bindings.txt b/Documentation/devicetree/bindings/clock/clock-bindings.txt
new file mode 100644
index 0000000..eb65d41
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/clock-bindings.txt
@@ -0,0 +1,117 @@
+This binding is a work-in-progress, and are based on some experimental
+work by benh[1].
+
+Sources of clock signal can be represented by any node in the device
+tree.  Those nodes are designated as clock providers.  Clock consumer
+nodes use a phandle and clock specifier pair to connect clock provider
+outputs to clock inputs.  Similar to the gpio specifiers, a clock
+specifier is an array of one more more cells identifying the clock
+output on a device.  The length of a clock specifier is defined by the
+value of a #clock-cells property in the clock provider node.
+
+[1] http://patchwork.ozlabs.org/patch/31551/
+
+==Clock providers==
+
+Required properties:
+#clock-cells:	   Number of cells in a clock specifier; Typically 0 for nodes
+		   with a single clock output and 1 for nodes with multiple
+		   clock outputs.
+
+Optional properties:
+clock-output-names: Recommended to be a list of strings of clock output signal
+		    names indexed by the first cell in the clock specifier.
+		    However, the meaning of clock-output-names is domain
+		    specific to the clock provider, and is only provided to
+		    encourage using the same meaning for the majority of clock
+		    providers.  This format may not work for clock providers
+		    using a complex clock specifier format.  In those cases it
+		    is recommended to omit this property and create a binding
+		    specific names property.
+
+		    Clock consumer nodes must never directly reference
+		    the provider's clock-output-names property.
+
+For example:
+
+    oscillator {
+        #clock-cells = <1>;
+        clock-output-names = "ckil", "ckih";
+    };
+
+- this node defines a device with two clock outputs, the first named
+  "ckil" and the second named "ckih".  Consumer nodes always reference
+  clocks by index. The names should reflect the clock output signal
+  names for the device.
+
+==Clock consumers==
+
+Required properties:
+clocks:		List of phandle and clock specifier pairs, one pair
+		for each clock input to the device.  Note: if the
+		clock provider specifies '0' for #clock-cells, then
+		only the phandle portion of the pair will appear.
+
+Optional properties:
+clock-names:	List of clock input name strings sorted in the same
+		order as the clocks property.  Consumers drivers
+		will use clock-names to match clock input names
+		with clocks specifiers.
+clock-ranges:	Empty property indicating that child nodes can inherit named
+		clocks from this node. Useful for bus nodes to provide a
+		clock to their children.
+
+For example:
+
+    device {
+        clocks = <&osc 1>, <&ref 0>;
+        clock-names = "baud", "register";
+    };
+
+
+This represents a device with two clock inputs, named "baud" and "register".
+The baud clock is connected to output 1 of the &osc device, and the register
+clock is connected to output 0 of the &ref.
+
+==Example==
+
+    /* external oscillator */
+    osc: oscillator {
+        compatible = "fixed-clock";
+        #clock-cells = <1>;
+        clock-frequency  = <32678>;
+        clock-output-names = "osc";
+    };
+
+    /* phase-locked-loop device, generates a higher frequency clock
+     * from the external oscillator reference */
+    pll: pll@4c000 {
+        compatible = "vendor,some-pll-interface"
+        #clock-cells = <1>;
+        clocks = <&osc 0>;
+        clock-names = "ref";
+        reg = <0x4c000 0x1000>;
+        clock-output-names = "pll", "pll-switched";
+    };
+
+    /* UART, using the low frequency oscillator for the baud clock,
+     * and the high frequency switched PLL output for register
+     * clocking */
+    uart@a000 {
+        compatible = "fsl,imx-uart";
+        reg = <0xa000 0x1000>;
+        interrupts = <33>;
+        clocks = <&osc 0>, <&pll 1>;
+        clock-names = "baud", "register";
+    };
+
+This DT fragment defines three devices: an external oscillator to provide a
+low-frequency reference clock, a PLL device to generate a higher frequency
+clock signal, and a UART.
+
+* The oscillator is fixed-frequency, and provides one clock output, named "osc".
+* The PLL is both a clock provider and a clock consumer. It uses the clock
+  signal generated by the external oscillator, and provides two output signals
+  ("pll" and "pll-switched").
+* The UART has its baud clock connected the external oscillator and its
+  register clock connected to the PLL clock (the "pll-switched" signal)
diff --git a/Documentation/devicetree/bindings/clock/fixed-clock.txt b/Documentation/devicetree/bindings/clock/fixed-clock.txt
new file mode 100644
index 0000000..39bd594
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/fixed-clock.txt
@@ -0,0 +1,22 @@
+Binding for simple fixed-rate clock sources.
+
+This binding uses the common clock binding[1].
+
+[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
+
+Required properties:
+- compatible : shall be "fixed-clock".
+- #clock-cells : from common clock binding; shall be set to 0.
+- clock-frequency : frequency of clock in Hz. Should be a single cell.
+
+Optional properties:
+- gpios : From common gpio binding; gpio connection to clock enable pin.
+- clock-output-names : From common clock binding. Required for nodes with
+  multiple outputs.
+
+Example:
+	clock {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <1000000000>;
+	};
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 9cf6f59..e28c883 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -16,6 +16,7 @@
 #include <linux/err.h>
 #include <linux/list.h>
 #include <linux/slab.h>
+#include <linux/of.h>
 
 static DEFINE_SPINLOCK(enable_lock);
 static DEFINE_MUTEX(prepare_lock);
@@ -1459,3 +1460,142 @@ int clk_notifier_unregister(struct clk *clk, struct notifier_block *nb)
 	return ret;
 }
 EXPORT_SYMBOL_GPL(clk_notifier_unregister);
+
+#ifdef CONFIG_OF
+/**
+ * struct of_clk_provider - Clock provider registration structure
+ * @link: Entry in global list of clock providers
+ * @node: Pointer to device tree node of clock provider
+ * @get: Get clock callback.  Returns NULL or a struct clk for the
+ *       given clock specifier
+ * @data: context pointer to be passed into @get callback
+ */
+struct of_clk_provider {
+	struct list_head link;
+
+	struct device_node *node;
+	struct clk *(*get)(struct of_phandle_args *clkspec, void *data);
+	void *data;
+};
+
+static LIST_HEAD(of_clk_providers);
+static DEFINE_MUTEX(of_clk_lock);
+
+struct clk *of_clk_src_simple_get(struct of_phandle_args *clkspec,
+				     void *data)
+{
+	return data;
+}
+EXPORT_SYMBOL_GPL(of_clk_src_simple_get);
+
+/**
+ * of_clk_add_provider() - Register a clock provider for a node
+ * @np: Device node pointer associated with clock provider
+ * @clk_src_get: callback for decoding clock
+ * @data: context pointer for @clk_src_get callback.
+ */
+int of_clk_add_provider(struct device_node *np,
+			struct clk *(*clk_src_get)(struct of_phandle_args *clkspec,
+						   void *data),
+			void *data)
+{
+	struct of_clk_provider *cp;
+
+	cp = kzalloc(sizeof(struct of_clk_provider), GFP_KERNEL);
+	if (!cp)
+		return -ENOMEM;
+
+	cp->node = of_node_get(np);
+	cp->data = data;
+	cp->get = clk_src_get;
+
+	mutex_lock(&of_clk_lock);
+	list_add(&cp->link, &of_clk_providers);
+	mutex_unlock(&of_clk_lock);
+	pr_debug("Added clock from %s\n", np->full_name);
+
+	return 0;
+}
+EXPORT_SYMBOL_GPL(of_clk_add_provider);
+
+/**
+ * of_clk_del_provider() - Remove a previously registered clock provider
+ * @np: Device node pointer associated with clock provider
+ */
+void of_clk_del_provider(struct device_node *np)
+{
+	struct of_clk_provider *cp;
+
+	mutex_lock(&of_clk_lock);
+	list_for_each_entry(cp, &of_clk_providers, link) {
+		if (cp->node == np) {
+			list_del(&cp->link);
+			of_node_put(cp->node);
+			kfree(cp);
+			break;
+		}
+	}
+	mutex_unlock(&of_clk_lock);
+}
+EXPORT_SYMBOL_GPL(of_clk_del_provider);
+
+struct clk *of_clk_get_from_provider(struct of_phandle_args *clkspec)
+{
+	struct of_clk_provider *provider;
+	struct clk *clk = NULL;
+
+	/* Check if we have such a provider in our array */
+	mutex_lock(&of_clk_lock);
+	list_for_each_entry(provider, &of_clk_providers, link) {
+		if (provider->node == clkspec->np)
+			clk = provider->get(clkspec, provider->data);
+		if (clk)
+			break;
+	}
+	mutex_unlock(&of_clk_lock);
+
+	return clk;
+}
+
+const char *of_clk_get_parent_name(struct device_node *np, int index)
+{
+	struct of_phandle_args clkspec;
+	const char *clk_name;
+	int rc;
+
+	if (index < 0)
+		return NULL;
+
+	rc = of_parse_phandle_with_args(np, "clocks", "#clock-cells", index,
+					&clkspec);
+	if (rc)
+		return NULL;
+
+	if (of_property_read_string_index(clkspec.np, "clock-output-names",
+					  clkspec.args_count ? clkspec.args[0] : 0,
+					  &clk_name) < 0)
+		clk_name = clkspec.np->name;
+
+	of_node_put(clkspec.np);
+	return clk_name;
+}
+EXPORT_SYMBOL_GPL(of_clk_get_parent_name);
+
+/**
+ * of_clk_init() - Scan and init clock providers from the DT
+ * @matches: array of compatible values and init functions for providers.
+ *
+ * This function scans the device tree for matching clock providers and
+ * calls their initialization functions
+ */
+void __init of_clk_init(const struct of_device_id *matches)
+{
+	struct device_node *np;
+
+	for_each_matching_node(np, matches) {
+		const struct of_device_id *match = of_match_node(matches, np);
+		of_clk_init_cb_t clk_init_cb = match->data;
+		clk_init_cb(np);
+	}
+}
+#endif
diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c
index 6db161f..e4d7b72 100644
--- a/drivers/clk/clkdev.c
+++ b/drivers/clk/clkdev.c
@@ -19,10 +19,80 @@
 #include <linux/mutex.h>
 #include <linux/clk.h>
 #include <linux/clkdev.h>
+#include <linux/of.h>
 
 static LIST_HEAD(clocks);
 static DEFINE_MUTEX(clocks_mutex);
 
+#ifdef CONFIG_OF
+struct clk *of_clk_get(struct device_node *np, int index)
+{
+	struct of_phandle_args clkspec;
+	struct clk *clk;
+	int rc;
+
+	if (index < 0)
+		return NULL;
+
+	rc = of_parse_phandle_with_args(np, "clocks", "#clock-cells", index,
+					&clkspec);
+	if (rc)
+		return NULL;
+
+	clk = of_clk_get_from_provider(&clkspec);
+	of_node_put(clkspec.np);
+	return clk;
+}
+EXPORT_SYMBOL(of_clk_get);
+
+/**
+ * of_clk_get_by_name() - Parse and lookup a clock referenced by a device node
+ * @np: pointer to clock consumer node
+ * @name: name of consumer's clock input, or NULL for the first clock reference
+ *
+ * This function parses the clocks and clock-names properties,
+ * and uses them to look up the struct clk from the registered list of clock
+ * providers.
+ */
+struct clk *of_clk_get_by_name(struct device_node *np, const char *name)
+{
+	struct clk *clk = NULL;
+
+	/* Walk up the tree of devices looking for a clock that matches */
+	while (np) {
+		int index = 0;
+
+		/*
+		 * For named clocks, first look up the name in the
+		 * "clock-names" property.  If it cannot be found, then
+		 * index will be an error code, and of_clk_get() will fail.
+		 */
+		if (name)
+			index = of_property_match_string(np, "clock-names", name);
+		clk = of_clk_get(np, index);
+		if (clk)
+			break;
+		else if (name && index >= 0) {
+			pr_err("ERROR: could not get clock %s:%s(%i)\n",
+				np->full_name, name ? name : "", index);
+			return NULL;
+		}
+
+		/*
+		 * No matching clock found on this node.  If the parent node
+		 * has a "clock-ranges" property, then we can try one of its
+		 * clocks.
+		 */
+		np = np->parent;
+		if (np && !of_get_property(np, "clock-ranges", NULL))
+			break;
+	}
+
+	return clk;
+}
+EXPORT_SYMBOL(of_clk_get_by_name);
+#endif
+
 /*
  * Find the correct struct clk for the device and connection ID.
  * We do slightly fuzzy matching here:
@@ -78,6 +148,13 @@ EXPORT_SYMBOL(clk_get_sys);
 struct clk *clk_get(struct device *dev, const char *con_id)
 {
 	const char *dev_id = dev ? dev_name(dev) : NULL;
+	struct clk *clk;
+
+	if (dev) {
+		clk = of_clk_get_by_name(dev->of_node, con_id);
+		if (clk && __clk_get(clk))
+			return clk;
+	}
 
 	return clk_get_sys(dev_id, con_id);
 }
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 5508897..0aab294 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -296,5 +296,19 @@ void __clk_unprepare(struct clk *clk);
 void __clk_reparent(struct clk *clk, struct clk *new_parent);
 unsigned long __clk_round_rate(struct clk *clk, unsigned long rate);
 
+struct of_device_id;
+
+typedef void (*of_clk_init_cb_t)(struct device_node *);
+
+int of_clk_add_provider(struct device_node *np,
+			struct clk *(*clk_src_get)(struct of_phandle_args *args,
+						   void *data),
+			void *data);
+void of_clk_del_provider(struct device_node *np);
+struct clk *of_clk_src_simple_get(struct of_phandle_args *clkspec,
+				  void *data);
+const char *of_clk_get_parent_name(struct device_node *np, int index);
+void of_clk_init(const struct of_device_id *matches);
+
 #endif /* CONFIG_COMMON_CLK */
 #endif /* CLK_PROVIDER_H */
diff --git a/include/linux/clk.h b/include/linux/clk.h
index e08bff1..0190a05 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -278,4 +278,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
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 4/4] clk: add DT fixed-clock binding support
  2012-04-09 20:24 [PATCH 0/4] DT clock binding support Rob Herring
                   ` (2 preceding siblings ...)
  2012-04-09 20:25 ` [PATCH 3/4] clk: add DT clock binding support Rob Herring
@ 2012-04-09 20:25 ` Rob Herring
  3 siblings, 0 replies; 16+ messages in thread
From: Rob Herring @ 2012-04-09 20:25 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel, devicetree-discuss
  Cc: Thierry Reding, Mike Turquette, Sascha Hauer, Grant Likely,
	shawn.guo, Rob Herring

From: Grant Likely <grant.likely@secretlab.ca>

Add support for DT "fixed-clock" binding to the common fixed rate clock
support.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
[Rob Herring] Rework and move into common clock infrastructure
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
 drivers/clk/clk-fixed-rate.c |   23 +++++++++++++++++++++++
 include/linux/clk-provider.h |    2 ++
 2 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/drivers/clk/clk-fixed-rate.c b/drivers/clk/clk-fixed-rate.c
index 90c79fb..72bd083 100644
--- a/drivers/clk/clk-fixed-rate.c
+++ b/drivers/clk/clk-fixed-rate.c
@@ -14,6 +14,7 @@
 #include <linux/slab.h>
 #include <linux/io.h>
 #include <linux/err.h>
+#include <linux/of.h>
 
 /*
  * DOC: basic fixed-rate clock that cannot gate
@@ -80,3 +81,25 @@ out:
 			(parent_name ? 1 : 0),
 			flags);
 }
+
+#ifdef CONFIG_OF
+/**
+ * of_fixed_clk_setup() - Setup function for simple fixed rate clock
+ */
+void __init of_fixed_clk_setup(struct device_node *node)
+{
+	struct clk *clk;
+	const char *clk_name = node->name;
+	u32 rate;
+
+	if (of_property_read_u32(node, "clock-frequency", &rate))
+		return;
+
+	of_property_read_string(node, "clock-output-names", &clk_name);
+
+	clk = clk_register_fixed_rate(NULL, clk_name, NULL, CLK_IS_ROOT, rate);
+	if (clk)
+		of_clk_add_provider(node, of_clk_src_simple_get, clk);
+}
+EXPORT_SYMBOL_GPL(of_fixed_clk_setup);
+#endif
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 0aab294..038d312 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -153,6 +153,8 @@ struct clk *clk_register_fixed_rate(struct device *dev, const char *name,
 		const char *parent_name, unsigned long flags,
 		unsigned long fixed_rate);
 
+void of_fixed_clk_setup(struct device_node *np);
+
 /**
  * struct clk_gate - gating clock
  *
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH 3/4] clk: add DT clock binding support
  2012-04-09 20:25 ` [PATCH 3/4] clk: add DT clock binding support Rob Herring
@ 2012-04-10  2:19   ` Shawn Guo
  2012-04-10  4:27   ` Fabio Estevam
  2012-05-01 22:59   ` Mike Turquette
  2 siblings, 0 replies; 16+ messages in thread
From: Shawn Guo @ 2012-04-10  2:19 UTC (permalink / raw)
  To: Rob Herring
  Cc: linux-arm-kernel, linux-kernel, devicetree-discuss,
	Thierry Reding, Mike Turquette, Sascha Hauer, Grant Likely,
	Rob Herring, Mike Turquette

On Mon, Apr 09, 2012 at 03:25:00PM -0500, Rob Herring wrote:
...
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/fixed-clock.txt
> @@ -0,0 +1,22 @@
> +Binding for simple fixed-rate clock sources.
> +
> +This binding uses the common clock binding[1].
> +
> +[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
> +
> +Required properties:
> +- compatible : shall be "fixed-clock".
> +- #clock-cells : from common clock binding; shall be set to 0.
> +- clock-frequency : frequency of clock in Hz. Should be a single cell.
						 ^^^^^^^^^^^^^^^^^^^^^^^
> +
> +Optional properties:
> +- gpios : From common gpio binding; gpio connection to clock enable pin.

I haven't seen this support in the code yet.

> +- clock-output-names : From common clock binding. Required for nodes with
> +  multiple outputs.

This seems inconsistent with above "Should be a single cell."

Regards,
Shawn

> +
> +Example:
> +	clock {
> +		compatible = "fixed-clock";
> +		#clock-cells = <0>;
> +		clock-frequency = <1000000000>;
> +	};

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 3/4] clk: add DT clock binding support
  2012-04-09 20:25 ` [PATCH 3/4] clk: add DT clock binding support Rob Herring
  2012-04-10  2:19   ` Shawn Guo
@ 2012-04-10  4:27   ` Fabio Estevam
  2012-04-10 12:57     ` Rob Herring
  2012-05-01 22:59   ` Mike Turquette
  2 siblings, 1 reply; 16+ messages in thread
From: Fabio Estevam @ 2012-04-10  4:27 UTC (permalink / raw)
  To: Rob Herring
  Cc: linux-arm-kernel, linux-kernel, devicetree-discuss,
	Mike Turquette, Thierry Reding, Rob Herring, Grant Likely,
	Sascha Hauer, shawn.guo, Mike Turquette

On Mon, Apr 9, 2012 at 5:25 PM, Rob Herring <robherring2@gmail.com> wrote:
> From: Grant Likely <grant.likely@secretlab.ca>
>
> Based on work 1st by Ben Herrenschmidt and Jeremy Kerr, then by Grant
> Likely, this patch adds support to clk_get to allow drivers to retrieve
> clock data from the device tree.
>
> Platforms scan for clocks in DT with of_clk_init and a match table, and
> the register a provider through of_clk_add_provider. The provider's
> clk_src_get function will be called when a device references the
> provider's OF node for a clock reference.
>
> v5 (Rob Herring):
>    - Move from drivers/of into common clock subsystem
>    - Squashed "dt/clock: add a simple provider get function" and
>      "dt/clock: add function to get parent clock name"
>    - Rebase to 3.4-rc1
>    - Drop CONFIG_OF_CLOCK and just use CONFIG_OF
>    - Add missing EXPORT_SYMBOL to various functions
>    - s/clock-output-name/clock-output-names/
>    - Define that fixed-clock binding is a single output

The patch history should go below the --- line,

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 3/4] clk: add DT clock binding support
  2012-04-10  4:27   ` Fabio Estevam
@ 2012-04-10 12:57     ` Rob Herring
  0 siblings, 0 replies; 16+ messages in thread
From: Rob Herring @ 2012-04-10 12:57 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: linux-arm-kernel, linux-kernel, devicetree-discuss,
	Mike Turquette, Thierry Reding, Grant Likely, Sascha Hauer,
	shawn.guo, Mike Turquette

On 04/09/2012 11:27 PM, Fabio Estevam wrote:
> On Mon, Apr 9, 2012 at 5:25 PM, Rob Herring <robherring2@gmail.com> wrote:
>> From: Grant Likely <grant.likely@secretlab.ca>
>>
>> Based on work 1st by Ben Herrenschmidt and Jeremy Kerr, then by Grant
>> Likely, this patch adds support to clk_get to allow drivers to retrieve
>> clock data from the device tree.
>>
>> Platforms scan for clocks in DT with of_clk_init and a match table, and
>> the register a provider through of_clk_add_provider. The provider's
>> clk_src_get function will be called when a device references the
>> provider's OF node for a clock reference.
>>
>> v5 (Rob Herring):
>>    - Move from drivers/of into common clock subsystem
>>    - Squashed "dt/clock: add a simple provider get function" and
>>      "dt/clock: add function to get parent clock name"
>>    - Rebase to 3.4-rc1
>>    - Drop CONFIG_OF_CLOCK and just use CONFIG_OF
>>    - Add missing EXPORT_SYMBOL to various functions
>>    - s/clock-output-name/clock-output-names/
>>    - Define that fixed-clock binding is a single output
> 
> The patch history should go below the --- line,

No, depends who you ask, and Grant is very much in favor of retaining
the history.

Rob

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/4] clk: select CLKDEV_LOOKUP for COMMON_CLK
  2012-04-09 20:24 ` [PATCH 1/4] clk: select CLKDEV_LOOKUP for COMMON_CLK Rob Herring
@ 2012-04-15  3:18   ` Rob Herring
  2012-04-17 22:13   ` Turquette, Mike
  1 sibling, 0 replies; 16+ messages in thread
From: Rob Herring @ 2012-04-15  3:18 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel, devicetree-discuss, Mike Turquette
  Cc: Thierry Reding, Sascha Hauer, Grant Likely, shawn.guo

Mike,

On 04/09/2012 03:24 PM, Rob Herring wrote:
> From: Rob Herring <rob.herring@calxeda.com>
> 
> Using the common clock infrastructure without the common clkdev code makes
> little sense, so select CLKDEV_LOOKUP for COMMON_CLK.
> 
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> ---

Can you apply the 1st 2 patches in this series to your clock fixes tree
for 3.4?

Rob

>  drivers/clk/Kconfig |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
> index 165e1fe..f05a60d 100644
> --- a/drivers/clk/Kconfig
> +++ b/drivers/clk/Kconfig
> @@ -12,6 +12,7 @@ config HAVE_MACH_CLKDEV
>  config COMMON_CLK
>  	bool
>  	select HAVE_CLK_PREPARE
> +	select CLKDEV_LOOKUP
>  	---help---
>  	  The common clock framework is a single definition of struct
>  	  clk, useful across many platforms, as well as an


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/4] clk: select CLKDEV_LOOKUP for COMMON_CLK
  2012-04-09 20:24 ` [PATCH 1/4] clk: select CLKDEV_LOOKUP for COMMON_CLK Rob Herring
  2012-04-15  3:18   ` Rob Herring
@ 2012-04-17 22:13   ` Turquette, Mike
  2012-04-18  7:07     ` Sascha Hauer
  1 sibling, 1 reply; 16+ messages in thread
From: Turquette, Mike @ 2012-04-17 22:13 UTC (permalink / raw)
  To: Rob Herring
  Cc: linux-arm-kernel, linux-kernel, devicetree-discuss,
	Thierry Reding, Rob Herring, Grant Likely, Sascha Hauer,
	shawn.guo

On Mon, Apr 9, 2012 at 1:24 PM, Rob Herring <robherring2@gmail.com> wrote:
> From: Rob Herring <rob.herring@calxeda.com>
>
> Using the common clock infrastructure without the common clkdev code makes
> little sense, so select CLKDEV_LOOKUP for COMMON_CLK.
>
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> ---
>  drivers/clk/Kconfig |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
> index 165e1fe..f05a60d 100644
> --- a/drivers/clk/Kconfig
> +++ b/drivers/clk/Kconfig
> @@ -12,6 +12,7 @@ config HAVE_MACH_CLKDEV
>  config COMMON_CLK
>        bool
>        select HAVE_CLK_PREPARE
> +       select CLKDEV_LOOKUP
>        ---help---
>          The common clock framework is a single definition of struct
>          clk, useful across many platforms, as well as an

Hi Rob,

I agree that the common clk framework is not particularly useful
without clkdev.  However the core code has no dependency on clkdev.
Why not just select it from an arch Kconfig, or even make it a
dependency based on your own platform clock data/code?

Regards,
Mike

> --
> 1.7.5.4
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/4] clk: select CLKDEV_LOOKUP for COMMON_CLK
  2012-04-17 22:13   ` Turquette, Mike
@ 2012-04-18  7:07     ` Sascha Hauer
  2012-04-19 14:59       ` Rob Herring
  0 siblings, 1 reply; 16+ messages in thread
From: Sascha Hauer @ 2012-04-18  7:07 UTC (permalink / raw)
  To: Turquette, Mike
  Cc: Rob Herring, linux-arm-kernel, linux-kernel, devicetree-discuss,
	Thierry Reding, Rob Herring, Grant Likely, Sascha Hauer,
	shawn.guo

On Tue, Apr 17, 2012 at 03:13:49PM -0700, Turquette, Mike wrote:
> On Mon, Apr 9, 2012 at 1:24 PM, Rob Herring <robherring2@gmail.com> wrote:
> > From: Rob Herring <rob.herring@calxeda.com>
> >
> > Using the common clock infrastructure without the common clkdev code makes
> > little sense, so select CLKDEV_LOOKUP for COMMON_CLK.
> >
> > Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> > ---
> >  drivers/clk/Kconfig |    1 +
> >  1 files changed, 1 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
> > index 165e1fe..f05a60d 100644
> > --- a/drivers/clk/Kconfig
> > +++ b/drivers/clk/Kconfig
> > @@ -12,6 +12,7 @@ config HAVE_MACH_CLKDEV
> >  config COMMON_CLK
> >        bool
> >        select HAVE_CLK_PREPARE
> > +       select CLKDEV_LOOKUP
> >        ---help---
> >          The common clock framework is a single definition of struct
> >          clk, useful across many platforms, as well as an
> 
> Hi Rob,
> 
> I agree that the common clk framework is not particularly useful
> without clkdev.  However the core code has no dependency on clkdev.
> Why not just select it from an arch Kconfig, or even make it a
> dependency based on your own platform clock data/code?

Selecting it from COMMON_CLK means that the compiler/linker will point
everybody trying to implement it without CLKDEV into the right
direction.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/4] clk: select CLKDEV_LOOKUP for COMMON_CLK
  2012-04-18  7:07     ` Sascha Hauer
@ 2012-04-19 14:59       ` Rob Herring
  2012-04-19 20:01         ` Turquette, Mike
  0 siblings, 1 reply; 16+ messages in thread
From: Rob Herring @ 2012-04-19 14:59 UTC (permalink / raw)
  To: Sascha Hauer
  Cc: Turquette, Mike, linux-arm-kernel, linux-kernel,
	devicetree-discuss, Thierry Reding, Rob Herring, Grant Likely,
	Sascha Hauer, shawn.guo

On 04/18/2012 02:07 AM, Sascha Hauer wrote:
> On Tue, Apr 17, 2012 at 03:13:49PM -0700, Turquette, Mike wrote:
>> On Mon, Apr 9, 2012 at 1:24 PM, Rob Herring <robherring2@gmail.com> wrote:
>>> From: Rob Herring <rob.herring@calxeda.com>
>>>
>>> Using the common clock infrastructure without the common clkdev code makes
>>> little sense, so select CLKDEV_LOOKUP for COMMON_CLK.
>>>
>>> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
>>> ---
>>>  drivers/clk/Kconfig |    1 +
>>>  1 files changed, 1 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
>>> index 165e1fe..f05a60d 100644
>>> --- a/drivers/clk/Kconfig
>>> +++ b/drivers/clk/Kconfig
>>> @@ -12,6 +12,7 @@ config HAVE_MACH_CLKDEV
>>>  config COMMON_CLK
>>>        bool
>>>        select HAVE_CLK_PREPARE
>>> +       select CLKDEV_LOOKUP
>>>        ---help---
>>>          The common clock framework is a single definition of struct
>>>          clk, useful across many platforms, as well as an
>>
>> Hi Rob,
>>
>> I agree that the common clk framework is not particularly useful
>> without clkdev.  However the core code has no dependency on clkdev.
>> Why not just select it from an arch Kconfig, or even make it a
>> dependency based on your own platform clock data/code?
> 
> Selecting it from COMMON_CLK means that the compiler/linker will point
> everybody trying to implement it without CLKDEV into the right
> direction.

Right. That was part of my rationale as well.

The DT clock support is dependent on both options, so without this patch
we'll have to add an otherwise unneeded OF_CLOCK option to select both.

Rob

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/4] clk: select CLKDEV_LOOKUP for COMMON_CLK
  2012-04-19 14:59       ` Rob Herring
@ 2012-04-19 20:01         ` Turquette, Mike
  0 siblings, 0 replies; 16+ messages in thread
From: Turquette, Mike @ 2012-04-19 20:01 UTC (permalink / raw)
  To: Rob Herring
  Cc: Sascha Hauer, linux-arm-kernel, linux-kernel, devicetree-discuss,
	Thierry Reding, Rob Herring, Grant Likely, Sascha Hauer,
	shawn.guo

On Thu, Apr 19, 2012 at 7:59 AM, Rob Herring <robherring2@gmail.com> wrote:
> On 04/18/2012 02:07 AM, Sascha Hauer wrote:
>> On Tue, Apr 17, 2012 at 03:13:49PM -0700, Turquette, Mike wrote:
>>> On Mon, Apr 9, 2012 at 1:24 PM, Rob Herring <robherring2@gmail.com> wrote:
>>>> From: Rob Herring <rob.herring@calxeda.com>
>>>>
>>>> Using the common clock infrastructure without the common clkdev code makes
>>>> little sense, so select CLKDEV_LOOKUP for COMMON_CLK.
>>>>
>>>> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
>>>> ---
>>>>  drivers/clk/Kconfig |    1 +
>>>>  1 files changed, 1 insertions(+), 0 deletions(-)
>>>>
>>>> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
>>>> index 165e1fe..f05a60d 100644
>>>> --- a/drivers/clk/Kconfig
>>>> +++ b/drivers/clk/Kconfig
>>>> @@ -12,6 +12,7 @@ config HAVE_MACH_CLKDEV
>>>>  config COMMON_CLK
>>>>        bool
>>>>        select HAVE_CLK_PREPARE
>>>> +       select CLKDEV_LOOKUP
>>>>        ---help---
>>>>          The common clock framework is a single definition of struct
>>>>          clk, useful across many platforms, as well as an
>>>
>>> Hi Rob,
>>>
>>> I agree that the common clk framework is not particularly useful
>>> without clkdev.  However the core code has no dependency on clkdev.
>>> Why not just select it from an arch Kconfig, or even make it a
>>> dependency based on your own platform clock data/code?
>>
>> Selecting it from COMMON_CLK means that the compiler/linker will point
>> everybody trying to implement it without CLKDEV into the right
>> direction.
>
> Right. That was part of my rationale as well.
>
> The DT clock support is dependent on both options, so without this patch
> we'll have to add an otherwise unneeded OF_CLOCK option to select both.

Ok.  I'll take this into my -next branch.

Thanks,
Mike

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/4] clk: remove trailing whitespace from clk.h
  2012-04-09 20:24 ` [PATCH 2/4] clk: remove trailing whitespace from clk.h Rob Herring
@ 2012-04-19 20:06   ` Turquette, Mike
  0 siblings, 0 replies; 16+ messages in thread
From: Turquette, Mike @ 2012-04-19 20:06 UTC (permalink / raw)
  To: Rob Herring
  Cc: linux-arm-kernel, linux-kernel, devicetree-discuss,
	Thierry Reding, Rob Herring, Grant Likely, Sascha Hauer,
	shawn.guo

On Mon, Apr 9, 2012 at 1:24 PM, Rob Herring <robherring2@gmail.com> wrote:
> From: Rob Herring <rob.herring@calxeda.com>
>
> Remove trailing whitespace from 2 lines.
>
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>

Hi Rob,

You asked me to take this patch in the mail thread for the first patch
in this series.  The code being touched here is really Russell's
territory but the change is trivial so I'll take it into my -next
branch.

Regards,
Mike

> ---
>  include/linux/clk.h |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/clk.h b/include/linux/clk.h
> index b025272..e08bff1 100644
> --- a/include/linux/clk.h
> +++ b/include/linux/clk.h
> @@ -220,7 +220,7 @@ void clk_put(struct clk *clk);
>  * Returns rounded clock rate in Hz, or negative errno.
>  */
>  long clk_round_rate(struct clk *clk, unsigned long rate);
> -
> +
>  /**
>  * clk_set_rate - set the clock rate for a clock source
>  * @clk: clock source
> @@ -229,7 +229,7 @@ long clk_round_rate(struct clk *clk, unsigned long rate);
>  * Returns success (0) or negative errno.
>  */
>  int clk_set_rate(struct clk *clk, unsigned long rate);
> -
> +
>  /**
>  * clk_set_parent - set the parent clock source for this clock
>  * @clk: clock source
> --
> 1.7.5.4
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 3/4] clk: add DT clock binding support
  2012-04-09 20:25 ` [PATCH 3/4] clk: add DT clock binding support Rob Herring
  2012-04-10  2:19   ` Shawn Guo
  2012-04-10  4:27   ` Fabio Estevam
@ 2012-05-01 22:59   ` Mike Turquette
  2012-05-14 13:40     ` Rob Herring
  2 siblings, 1 reply; 16+ messages in thread
From: Mike Turquette @ 2012-05-01 22:59 UTC (permalink / raw)
  To: Rob Herring
  Cc: linux-arm-kernel, linux-kernel, devicetree-discuss,
	Thierry Reding, Mike Turquette, Sascha Hauer, Grant Likely,
	shawn.guo, Rob Herring

On 20120409-15:25, Rob Herring wrote:
> From: Grant Likely <grant.likely@secretlab.ca>
snip
> ---
>  .../devicetree/bindings/clock/clock-bindings.txt   |  117 ++++++++++++++++
>  .../devicetree/bindings/clock/fixed-clock.txt      |   22 +++
>  drivers/clk/clk.c                                  |  140 ++++++++++++++++++++
>  drivers/clk/clkdev.c                               |   77 +++++++++++
>  include/linux/clk-provider.h                       |   14 ++
>  include/linux/clk.h                                |   19 +++
>  6 files changed, 389 insertions(+), 0 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/clock/clock-bindings.txt
>  create mode 100644 Documentation/devicetree/bindings/clock/fixed-clock.txt

Hi Rob,

Patches 1 & 2 are trivial and certainly aimed at clk-next, so I've taken
them in.  This patch is a bit more difficult as it touches the common
clk code, clkdev/clk.h and some DT docs.

Are you looking for me to take this patch into clk-next?  I'm just
trying to avoid any more clk dependency issues than we already have...

Thanks,
Mike

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 3/4] clk: add DT clock binding support
  2012-05-01 22:59   ` Mike Turquette
@ 2012-05-14 13:40     ` Rob Herring
  0 siblings, 0 replies; 16+ messages in thread
From: Rob Herring @ 2012-05-14 13:40 UTC (permalink / raw)
  To: Mike Turquette
  Cc: linux-arm-kernel, linux-kernel, devicetree-discuss,
	Thierry Reding, Mike Turquette, Sascha Hauer, Grant Likely,
	shawn.guo, Rob Herring

On 05/01/2012 05:59 PM, Mike Turquette wrote:
> On 20120409-15:25, Rob Herring wrote:
>> From: Grant Likely <grant.likely@secretlab.ca>
> snip
>> ---
>>  .../devicetree/bindings/clock/clock-bindings.txt   |  117 ++++++++++++++++
>>  .../devicetree/bindings/clock/fixed-clock.txt      |   22 +++
>>  drivers/clk/clk.c                                  |  140 ++++++++++++++++++++
>>  drivers/clk/clkdev.c                               |   77 +++++++++++
>>  include/linux/clk-provider.h                       |   14 ++
>>  include/linux/clk.h                                |   19 +++
>>  6 files changed, 389 insertions(+), 0 deletions(-)
>>  create mode 100644 Documentation/devicetree/bindings/clock/clock-bindings.txt
>>  create mode 100644 Documentation/devicetree/bindings/clock/fixed-clock.txt
> 
> Hi Rob,
> 
> Patches 1 & 2 are trivial and certainly aimed at clk-next, so I've taken
> them in.  This patch is a bit more difficult as it touches the common
> clk code, clkdev/clk.h and some DT docs.
> 
> Are you looking for me to take this patch into clk-next?  I'm just
> trying to avoid any more clk dependency issues than we already have...
> 

I think that makes the most sense as it appears I'm dependent on
clk-next now. I'm rebasing my patches on clk-next now.

Rob


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2012-05-14 13:40 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-09 20:24 [PATCH 0/4] DT clock binding support Rob Herring
2012-04-09 20:24 ` [PATCH 1/4] clk: select CLKDEV_LOOKUP for COMMON_CLK Rob Herring
2012-04-15  3:18   ` Rob Herring
2012-04-17 22:13   ` Turquette, Mike
2012-04-18  7:07     ` Sascha Hauer
2012-04-19 14:59       ` Rob Herring
2012-04-19 20:01         ` Turquette, Mike
2012-04-09 20:24 ` [PATCH 2/4] clk: remove trailing whitespace from clk.h Rob Herring
2012-04-19 20:06   ` Turquette, Mike
2012-04-09 20:25 ` [PATCH 3/4] clk: add DT clock binding support Rob Herring
2012-04-10  2:19   ` Shawn Guo
2012-04-10  4:27   ` Fabio Estevam
2012-04-10 12:57     ` Rob Herring
2012-05-01 22:59   ` Mike Turquette
2012-05-14 13:40     ` Rob Herring
2012-04-09 20:25 ` [PATCH 4/4] clk: add DT fixed-clock " Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).