All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Introduce of_match_machine() helper
@ 2014-08-07 23:01 ` Tuomas Tynkkynen
  0 siblings, 0 replies; 46+ messages in thread
From: Tuomas Tynkkynen @ 2014-08-07 23:01 UTC (permalink / raw)
  To: Grant Likely, Rob Herring
  Cc: Stephen Warren, Thierry Reding, linux-pm-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Rafael J. Wysocki,
	Daniel Lezcano, Lorenzo Pieralisi, Tuomas Tynkkynen

Some mach-specific drivers that don't require their own node in the device tree
(for example drivers/soc/*, cpufreq, cpuidle etc.) want to match on the device
tree root compatible property instead. Instead of open-coding (and forgetting
to call of_node_put on the root node) everywhere, add a helper to the OF core.

Tuomas Tynkkynen (3):
  of: Add of_match_machine helper
  soc/tegra: Use of_match_machine in soc_is_tegra()
  cpuidle: big.LITTLE: Use of_match_machine

 drivers/cpuidle/cpuidle-big_little.c |  6 +-----
 drivers/of/base.c                    | 21 +++++++++++++++++++++
 drivers/soc/tegra/common.c           |  8 +-------
 include/linux/of.h                   |  3 +++
 4 files changed, 26 insertions(+), 12 deletions(-)

-- 
1.8.1.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 0/3] Introduce of_match_machine() helper
@ 2014-08-07 23:01 ` Tuomas Tynkkynen
  0 siblings, 0 replies; 46+ messages in thread
From: Tuomas Tynkkynen @ 2014-08-07 23:01 UTC (permalink / raw)
  To: Grant Likely, Rob Herring
  Cc: Stephen Warren, Thierry Reding, linux-pm, linux-arm-kernel,
	linux-kernel, devicetree, linux-tegra, Rafael J. Wysocki,
	Daniel Lezcano, Lorenzo Pieralisi, Tuomas Tynkkynen

Some mach-specific drivers that don't require their own node in the device tree
(for example drivers/soc/*, cpufreq, cpuidle etc.) want to match on the device
tree root compatible property instead. Instead of open-coding (and forgetting
to call of_node_put on the root node) everywhere, add a helper to the OF core.

Tuomas Tynkkynen (3):
  of: Add of_match_machine helper
  soc/tegra: Use of_match_machine in soc_is_tegra()
  cpuidle: big.LITTLE: Use of_match_machine

 drivers/cpuidle/cpuidle-big_little.c |  6 +-----
 drivers/of/base.c                    | 21 +++++++++++++++++++++
 drivers/soc/tegra/common.c           |  8 +-------
 include/linux/of.h                   |  3 +++
 4 files changed, 26 insertions(+), 12 deletions(-)

-- 
1.8.1.5


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

* [PATCH 0/3] Introduce of_match_machine() helper
@ 2014-08-07 23:01 ` Tuomas Tynkkynen
  0 siblings, 0 replies; 46+ messages in thread
From: Tuomas Tynkkynen @ 2014-08-07 23:01 UTC (permalink / raw)
  To: linux-arm-kernel

Some mach-specific drivers that don't require their own node in the device tree
(for example drivers/soc/*, cpufreq, cpuidle etc.) want to match on the device
tree root compatible property instead. Instead of open-coding (and forgetting
to call of_node_put on the root node) everywhere, add a helper to the OF core.

Tuomas Tynkkynen (3):
  of: Add of_match_machine helper
  soc/tegra: Use of_match_machine in soc_is_tegra()
  cpuidle: big.LITTLE: Use of_match_machine

 drivers/cpuidle/cpuidle-big_little.c |  6 +-----
 drivers/of/base.c                    | 21 +++++++++++++++++++++
 drivers/soc/tegra/common.c           |  8 +-------
 include/linux/of.h                   |  3 +++
 4 files changed, 26 insertions(+), 12 deletions(-)

-- 
1.8.1.5

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

* [PATCH 1/3] of: Add of_match_machine helper
  2014-08-07 23:01 ` Tuomas Tynkkynen
  (?)
@ 2014-08-07 23:01   ` Tuomas Tynkkynen
  -1 siblings, 0 replies; 46+ messages in thread
From: Tuomas Tynkkynen @ 2014-08-07 23:01 UTC (permalink / raw)
  To: Grant Likely, Rob Herring
  Cc: Stephen Warren, Thierry Reding, linux-pm, linux-arm-kernel,
	linux-kernel, devicetree, linux-tegra, Rafael J. Wysocki,
	Daniel Lezcano, Lorenzo Pieralisi, Tuomas Tynkkynen

Add of_match_machine function to test the device tree root for an
of_match array. This can be useful when testing SoC versions at runtime,
for example.

Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
---
 drivers/of/base.c  | 21 +++++++++++++++++++++
 include/linux/of.h |  3 +++
 2 files changed, 24 insertions(+)

diff --git a/drivers/of/base.c b/drivers/of/base.c
index d8574ad..37798ea 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -977,6 +977,27 @@ struct device_node *of_find_matching_node_and_match(struct device_node *from,
 EXPORT_SYMBOL(of_find_matching_node_and_match);
 
 /**
+ * of_match_machine - Tell if root of device tree has a matching of_match struct
+ *	@matches:	array of of device match structures to search in
+ *
+ *	Returns the result of of_match_node for the root node.
+ */
+const struct of_device_id *of_match_machine(const struct of_device_id *matches)
+{
+	const struct of_device_id *match;
+	struct device_node *root;
+
+	root = of_find_node_by_path("/");
+	if (!root)
+		return NULL;
+
+	match = of_match_node(matches, root);
+	of_node_put(root);
+	return match;
+}
+EXPORT_SYMBOL(of_match_machine);
+
+/**
  * of_modalias_node - Lookup appropriate modalias for a device node
  * @node:	pointer to a device tree node
  * @modalias:	Pointer to buffer that modalias value will be copied into
diff --git a/include/linux/of.h b/include/linux/of.h
index 6c4363b..b7a8817 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -289,6 +289,8 @@ extern int of_n_addr_cells(struct device_node *np);
 extern int of_n_size_cells(struct device_node *np);
 extern const struct of_device_id *of_match_node(
 	const struct of_device_id *matches, const struct device_node *node);
+extern const struct of_device_id *of_match_machine(
+	const struct of_device_id *matches);
 extern int of_modalias_node(struct device_node *node, char *modalias, int len);
 extern void of_print_phandle_args(const char *msg, const struct of_phandle_args *args);
 extern struct device_node *of_parse_phandle(const struct device_node *np,
@@ -584,6 +586,7 @@ static inline const char *of_prop_next_string(struct property *prop,
 
 #define of_match_ptr(_ptr)	NULL
 #define of_match_node(_matches, _node)	NULL
+#define of_match_machine(_matches)	NULL
 #endif /* CONFIG_OF */
 
 #if defined(CONFIG_OF) && defined(CONFIG_NUMA)
-- 
1.8.1.5

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

* [PATCH 1/3] of: Add of_match_machine helper
@ 2014-08-07 23:01   ` Tuomas Tynkkynen
  0 siblings, 0 replies; 46+ messages in thread
From: Tuomas Tynkkynen @ 2014-08-07 23:01 UTC (permalink / raw)
  To: Grant Likely, Rob Herring
  Cc: Stephen Warren, Thierry Reding, linux-pm, linux-arm-kernel,
	linux-kernel, devicetree, linux-tegra, Rafael J. Wysocki,
	Daniel Lezcano, Lorenzo Pieralisi, Tuomas Tynkkynen

Add of_match_machine function to test the device tree root for an
of_match array. This can be useful when testing SoC versions at runtime,
for example.

Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
---
 drivers/of/base.c  | 21 +++++++++++++++++++++
 include/linux/of.h |  3 +++
 2 files changed, 24 insertions(+)

diff --git a/drivers/of/base.c b/drivers/of/base.c
index d8574ad..37798ea 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -977,6 +977,27 @@ struct device_node *of_find_matching_node_and_match(struct device_node *from,
 EXPORT_SYMBOL(of_find_matching_node_and_match);
 
 /**
+ * of_match_machine - Tell if root of device tree has a matching of_match struct
+ *	@matches:	array of of device match structures to search in
+ *
+ *	Returns the result of of_match_node for the root node.
+ */
+const struct of_device_id *of_match_machine(const struct of_device_id *matches)
+{
+	const struct of_device_id *match;
+	struct device_node *root;
+
+	root = of_find_node_by_path("/");
+	if (!root)
+		return NULL;
+
+	match = of_match_node(matches, root);
+	of_node_put(root);
+	return match;
+}
+EXPORT_SYMBOL(of_match_machine);
+
+/**
  * of_modalias_node - Lookup appropriate modalias for a device node
  * @node:	pointer to a device tree node
  * @modalias:	Pointer to buffer that modalias value will be copied into
diff --git a/include/linux/of.h b/include/linux/of.h
index 6c4363b..b7a8817 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -289,6 +289,8 @@ extern int of_n_addr_cells(struct device_node *np);
 extern int of_n_size_cells(struct device_node *np);
 extern const struct of_device_id *of_match_node(
 	const struct of_device_id *matches, const struct device_node *node);
+extern const struct of_device_id *of_match_machine(
+	const struct of_device_id *matches);
 extern int of_modalias_node(struct device_node *node, char *modalias, int len);
 extern void of_print_phandle_args(const char *msg, const struct of_phandle_args *args);
 extern struct device_node *of_parse_phandle(const struct device_node *np,
@@ -584,6 +586,7 @@ static inline const char *of_prop_next_string(struct property *prop,
 
 #define of_match_ptr(_ptr)	NULL
 #define of_match_node(_matches, _node)	NULL
+#define of_match_machine(_matches)	NULL
 #endif /* CONFIG_OF */
 
 #if defined(CONFIG_OF) && defined(CONFIG_NUMA)
-- 
1.8.1.5


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

* [PATCH 1/3] of: Add of_match_machine helper
@ 2014-08-07 23:01   ` Tuomas Tynkkynen
  0 siblings, 0 replies; 46+ messages in thread
From: Tuomas Tynkkynen @ 2014-08-07 23:01 UTC (permalink / raw)
  To: linux-arm-kernel

Add of_match_machine function to test the device tree root for an
of_match array. This can be useful when testing SoC versions at runtime,
for example.

Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
---
 drivers/of/base.c  | 21 +++++++++++++++++++++
 include/linux/of.h |  3 +++
 2 files changed, 24 insertions(+)

diff --git a/drivers/of/base.c b/drivers/of/base.c
index d8574ad..37798ea 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -977,6 +977,27 @@ struct device_node *of_find_matching_node_and_match(struct device_node *from,
 EXPORT_SYMBOL(of_find_matching_node_and_match);
 
 /**
+ * of_match_machine - Tell if root of device tree has a matching of_match struct
+ *	@matches:	array of of device match structures to search in
+ *
+ *	Returns the result of of_match_node for the root node.
+ */
+const struct of_device_id *of_match_machine(const struct of_device_id *matches)
+{
+	const struct of_device_id *match;
+	struct device_node *root;
+
+	root = of_find_node_by_path("/");
+	if (!root)
+		return NULL;
+
+	match = of_match_node(matches, root);
+	of_node_put(root);
+	return match;
+}
+EXPORT_SYMBOL(of_match_machine);
+
+/**
  * of_modalias_node - Lookup appropriate modalias for a device node
  * @node:	pointer to a device tree node
  * @modalias:	Pointer to buffer that modalias value will be copied into
diff --git a/include/linux/of.h b/include/linux/of.h
index 6c4363b..b7a8817 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -289,6 +289,8 @@ extern int of_n_addr_cells(struct device_node *np);
 extern int of_n_size_cells(struct device_node *np);
 extern const struct of_device_id *of_match_node(
 	const struct of_device_id *matches, const struct device_node *node);
+extern const struct of_device_id *of_match_machine(
+	const struct of_device_id *matches);
 extern int of_modalias_node(struct device_node *node, char *modalias, int len);
 extern void of_print_phandle_args(const char *msg, const struct of_phandle_args *args);
 extern struct device_node *of_parse_phandle(const struct device_node *np,
@@ -584,6 +586,7 @@ static inline const char *of_prop_next_string(struct property *prop,
 
 #define of_match_ptr(_ptr)	NULL
 #define of_match_node(_matches, _node)	NULL
+#define of_match_machine(_matches)	NULL
 #endif /* CONFIG_OF */
 
 #if defined(CONFIG_OF) && defined(CONFIG_NUMA)
-- 
1.8.1.5

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

* [PATCH 2/3] soc/tegra: Use of_match_machine in soc_is_tegra()
  2014-08-07 23:01 ` Tuomas Tynkkynen
  (?)
@ 2014-08-07 23:01     ` Tuomas Tynkkynen
  -1 siblings, 0 replies; 46+ messages in thread
From: Tuomas Tynkkynen @ 2014-08-07 23:01 UTC (permalink / raw)
  To: Grant Likely, Rob Herring
  Cc: Stephen Warren, Thierry Reding, linux-pm-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Rafael J. Wysocki,
	Daniel Lezcano, Lorenzo Pieralisi, Tuomas Tynkkynen

Use the new helper function, also fixing a device_node refcount leak.

Signed-off-by: Tuomas Tynkkynen <ttynkkynen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 drivers/soc/tegra/common.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/soc/tegra/common.c b/drivers/soc/tegra/common.c
index a71cb74..f6571f5 100644
--- a/drivers/soc/tegra/common.c
+++ b/drivers/soc/tegra/common.c
@@ -20,11 +20,5 @@ static const struct of_device_id tegra_machine_match[] = {
 
 bool soc_is_tegra(void)
 {
-	struct device_node *root;
-
-	root = of_find_node_by_path("/");
-	if (!root)
-		return false;
-
-	return of_match_node(tegra_machine_match, root) != NULL;
+	return of_match_machine(tegra_machine_match) != NULL;
 }
-- 
1.8.1.5

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

* [PATCH 2/3] soc/tegra: Use of_match_machine in soc_is_tegra()
@ 2014-08-07 23:01     ` Tuomas Tynkkynen
  0 siblings, 0 replies; 46+ messages in thread
From: Tuomas Tynkkynen @ 2014-08-07 23:01 UTC (permalink / raw)
  To: Grant Likely, Rob Herring
  Cc: Stephen Warren, Thierry Reding, linux-pm, linux-arm-kernel,
	linux-kernel, devicetree, linux-tegra, Rafael J. Wysocki,
	Daniel Lezcano, Lorenzo Pieralisi, Tuomas Tynkkynen

Use the new helper function, also fixing a device_node refcount leak.

Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
---
 drivers/soc/tegra/common.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/soc/tegra/common.c b/drivers/soc/tegra/common.c
index a71cb74..f6571f5 100644
--- a/drivers/soc/tegra/common.c
+++ b/drivers/soc/tegra/common.c
@@ -20,11 +20,5 @@ static const struct of_device_id tegra_machine_match[] = {
 
 bool soc_is_tegra(void)
 {
-	struct device_node *root;
-
-	root = of_find_node_by_path("/");
-	if (!root)
-		return false;
-
-	return of_match_node(tegra_machine_match, root) != NULL;
+	return of_match_machine(tegra_machine_match) != NULL;
 }
-- 
1.8.1.5


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

* [PATCH 2/3] soc/tegra: Use of_match_machine in soc_is_tegra()
@ 2014-08-07 23:01     ` Tuomas Tynkkynen
  0 siblings, 0 replies; 46+ messages in thread
From: Tuomas Tynkkynen @ 2014-08-07 23:01 UTC (permalink / raw)
  To: linux-arm-kernel

Use the new helper function, also fixing a device_node refcount leak.

Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
---
 drivers/soc/tegra/common.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/soc/tegra/common.c b/drivers/soc/tegra/common.c
index a71cb74..f6571f5 100644
--- a/drivers/soc/tegra/common.c
+++ b/drivers/soc/tegra/common.c
@@ -20,11 +20,5 @@ static const struct of_device_id tegra_machine_match[] = {
 
 bool soc_is_tegra(void)
 {
-	struct device_node *root;
-
-	root = of_find_node_by_path("/");
-	if (!root)
-		return false;
-
-	return of_match_node(tegra_machine_match, root) != NULL;
+	return of_match_machine(tegra_machine_match) != NULL;
 }
-- 
1.8.1.5

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

* [PATCH 3/3] cpuidle: big.LITTLE: Use of_match_machine
  2014-08-07 23:01 ` Tuomas Tynkkynen
  (?)
@ 2014-08-07 23:01     ` Tuomas Tynkkynen
  -1 siblings, 0 replies; 46+ messages in thread
From: Tuomas Tynkkynen @ 2014-08-07 23:01 UTC (permalink / raw)
  To: Grant Likely, Rob Herring
  Cc: Stephen Warren, Thierry Reding, linux-pm-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Rafael J. Wysocki,
	Daniel Lezcano, Lorenzo Pieralisi, Tuomas Tynkkynen

Use the new helper function, also fixing a device_node refcount leak.

Signed-off-by: Tuomas Tynkkynen <ttynkkynen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
Compile tested only.

 drivers/cpuidle/cpuidle-big_little.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/cpuidle/cpuidle-big_little.c b/drivers/cpuidle/cpuidle-big_little.c
index 344d79fa..53524c8 100644
--- a/drivers/cpuidle/cpuidle-big_little.c
+++ b/drivers/cpuidle/cpuidle-big_little.c
@@ -172,15 +172,11 @@ static const struct of_device_id compatible_machine_match[] = {
 static int __init bl_idle_init(void)
 {
 	int ret;
-	struct device_node *root = of_find_node_by_path("/");
-
-	if (!root)
-		return -ENODEV;
 
 	/*
 	 * Initialize the driver just for a compliant set of machines
 	 */
-	if (!of_match_node(compatible_machine_match, root))
+	if (!of_match_machine(compatible_machine_match))
 		return -ENODEV;
 	/*
 	 * For now the differentiation between little and big cores
-- 
1.8.1.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 3/3] cpuidle: big.LITTLE: Use of_match_machine
@ 2014-08-07 23:01     ` Tuomas Tynkkynen
  0 siblings, 0 replies; 46+ messages in thread
From: Tuomas Tynkkynen @ 2014-08-07 23:01 UTC (permalink / raw)
  To: Grant Likely, Rob Herring
  Cc: Stephen Warren, Thierry Reding, linux-pm, linux-arm-kernel,
	linux-kernel, devicetree, linux-tegra, Rafael J. Wysocki,
	Daniel Lezcano, Lorenzo Pieralisi, Tuomas Tynkkynen

Use the new helper function, also fixing a device_node refcount leak.

Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
---
Compile tested only.

 drivers/cpuidle/cpuidle-big_little.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/cpuidle/cpuidle-big_little.c b/drivers/cpuidle/cpuidle-big_little.c
index 344d79fa..53524c8 100644
--- a/drivers/cpuidle/cpuidle-big_little.c
+++ b/drivers/cpuidle/cpuidle-big_little.c
@@ -172,15 +172,11 @@ static const struct of_device_id compatible_machine_match[] = {
 static int __init bl_idle_init(void)
 {
 	int ret;
-	struct device_node *root = of_find_node_by_path("/");
-
-	if (!root)
-		return -ENODEV;
 
 	/*
 	 * Initialize the driver just for a compliant set of machines
 	 */
-	if (!of_match_node(compatible_machine_match, root))
+	if (!of_match_machine(compatible_machine_match))
 		return -ENODEV;
 	/*
 	 * For now the differentiation between little and big cores
-- 
1.8.1.5


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

* [PATCH 3/3] cpuidle: big.LITTLE: Use of_match_machine
@ 2014-08-07 23:01     ` Tuomas Tynkkynen
  0 siblings, 0 replies; 46+ messages in thread
From: Tuomas Tynkkynen @ 2014-08-07 23:01 UTC (permalink / raw)
  To: linux-arm-kernel

Use the new helper function, also fixing a device_node refcount leak.

Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
---
Compile tested only.

 drivers/cpuidle/cpuidle-big_little.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/cpuidle/cpuidle-big_little.c b/drivers/cpuidle/cpuidle-big_little.c
index 344d79fa..53524c8 100644
--- a/drivers/cpuidle/cpuidle-big_little.c
+++ b/drivers/cpuidle/cpuidle-big_little.c
@@ -172,15 +172,11 @@ static const struct of_device_id compatible_machine_match[] = {
 static int __init bl_idle_init(void)
 {
 	int ret;
-	struct device_node *root = of_find_node_by_path("/");
-
-	if (!root)
-		return -ENODEV;
 
 	/*
 	 * Initialize the driver just for a compliant set of machines
 	 */
-	if (!of_match_node(compatible_machine_match, root))
+	if (!of_match_machine(compatible_machine_match))
 		return -ENODEV;
 	/*
 	 * For now the differentiation between little and big cores
-- 
1.8.1.5

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

* Re: [PATCH 2/3] soc/tegra: Use of_match_machine in soc_is_tegra()
  2014-08-07 23:01     ` Tuomas Tynkkynen
  (?)
@ 2014-08-07 23:28         ` Stephen Warren
  -1 siblings, 0 replies; 46+ messages in thread
From: Stephen Warren @ 2014-08-07 23:28 UTC (permalink / raw)
  To: Tuomas Tynkkynen
  Cc: Grant Likely, Rob Herring, Thierry Reding,
	linux-pm-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Rafael J. Wysocki,
	Daniel Lezcano, Lorenzo Pieralisi

On 08/07/2014 05:01 PM, Tuomas Tynkkynen wrote:
> Use the new helper function, also fixing a device_node refcount leak.

Acked-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

I assume this will go through some common branch in arm-soc so others 
can build on it?

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

* Re: [PATCH 2/3] soc/tegra: Use of_match_machine in soc_is_tegra()
@ 2014-08-07 23:28         ` Stephen Warren
  0 siblings, 0 replies; 46+ messages in thread
From: Stephen Warren @ 2014-08-07 23:28 UTC (permalink / raw)
  To: Tuomas Tynkkynen
  Cc: Grant Likely, Rob Herring, Thierry Reding, linux-pm,
	linux-arm-kernel, linux-kernel, devicetree, linux-tegra,
	Rafael J. Wysocki, Daniel Lezcano, Lorenzo Pieralisi

On 08/07/2014 05:01 PM, Tuomas Tynkkynen wrote:
> Use the new helper function, also fixing a device_node refcount leak.

Acked-by: Stephen Warren <swarren@nvidia.com>

I assume this will go through some common branch in arm-soc so others 
can build on it?

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

* [PATCH 2/3] soc/tegra: Use of_match_machine in soc_is_tegra()
@ 2014-08-07 23:28         ` Stephen Warren
  0 siblings, 0 replies; 46+ messages in thread
From: Stephen Warren @ 2014-08-07 23:28 UTC (permalink / raw)
  To: linux-arm-kernel

On 08/07/2014 05:01 PM, Tuomas Tynkkynen wrote:
> Use the new helper function, also fixing a device_node refcount leak.

Acked-by: Stephen Warren <swarren@nvidia.com>

I assume this will go through some common branch in arm-soc so others 
can build on it?

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

* Re: [PATCH 1/3] of: Add of_match_machine helper
  2014-08-07 23:01   ` Tuomas Tynkkynen
  (?)
@ 2014-08-08  9:41       ` Thierry Reding
  -1 siblings, 0 replies; 46+ messages in thread
From: Thierry Reding @ 2014-08-08  9:41 UTC (permalink / raw)
  To: Tuomas Tynkkynen
  Cc: Grant Likely, Rob Herring, Stephen Warren,
	linux-pm-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Rafael J. Wysocki,
	Daniel Lezcano, Lorenzo Pieralisi

[-- Attachment #1: Type: text/plain, Size: 1743 bytes --]

On Fri, Aug 08, 2014 at 02:01:53AM +0300, Tuomas Tynkkynen wrote:
> Add of_match_machine function to test the device tree root for an
> of_match array. This can be useful when testing SoC versions at runtime,
> for example.
> 
> Signed-off-by: Tuomas Tynkkynen <ttynkkynen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
>  drivers/of/base.c  | 21 +++++++++++++++++++++
>  include/linux/of.h |  3 +++
>  2 files changed, 24 insertions(+)
> 
> diff --git a/drivers/of/base.c b/drivers/of/base.c
> index d8574ad..37798ea 100644
> --- a/drivers/of/base.c
> +++ b/drivers/of/base.c
> @@ -977,6 +977,27 @@ struct device_node *of_find_matching_node_and_match(struct device_node *from,
>  EXPORT_SYMBOL(of_find_matching_node_and_match);
>  
>  /**
> + * of_match_machine - Tell if root of device tree has a matching of_match struct
> + *	@matches:	array of of device match structures to search in
> + *
> + *	Returns the result of of_match_node for the root node.
> + */

I was going to say that this kerneldoc is weirdly formatted, but when I
looked at the other kerneldoc comments in this file it seems that they
use similarly weird formatting...

> +const struct of_device_id *of_match_machine(const struct of_device_id *matches)
> +{
> +	const struct of_device_id *match;
> +	struct device_node *root;
> +
> +	root = of_find_node_by_path("/");
> +	if (!root)
> +		return NULL;
> +
> +	match = of_match_node(matches, root);
> +	of_node_put(root);
> +	return match;
> +}
> +EXPORT_SYMBOL(of_match_machine);

I wonder if of_find_node_by_path("/") is somewhat overkill here. Perhaps
simply of_node_get(of_allnodes) would be more appropriate here since the
function is implemented in the core?

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH 1/3] of: Add of_match_machine helper
@ 2014-08-08  9:41       ` Thierry Reding
  0 siblings, 0 replies; 46+ messages in thread
From: Thierry Reding @ 2014-08-08  9:41 UTC (permalink / raw)
  To: Tuomas Tynkkynen
  Cc: Grant Likely, Rob Herring, Stephen Warren, linux-pm,
	linux-arm-kernel, linux-kernel, devicetree, linux-tegra,
	Rafael J. Wysocki, Daniel Lezcano, Lorenzo Pieralisi

[-- Attachment #1: Type: text/plain, Size: 1714 bytes --]

On Fri, Aug 08, 2014 at 02:01:53AM +0300, Tuomas Tynkkynen wrote:
> Add of_match_machine function to test the device tree root for an
> of_match array. This can be useful when testing SoC versions at runtime,
> for example.
> 
> Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
> ---
>  drivers/of/base.c  | 21 +++++++++++++++++++++
>  include/linux/of.h |  3 +++
>  2 files changed, 24 insertions(+)
> 
> diff --git a/drivers/of/base.c b/drivers/of/base.c
> index d8574ad..37798ea 100644
> --- a/drivers/of/base.c
> +++ b/drivers/of/base.c
> @@ -977,6 +977,27 @@ struct device_node *of_find_matching_node_and_match(struct device_node *from,
>  EXPORT_SYMBOL(of_find_matching_node_and_match);
>  
>  /**
> + * of_match_machine - Tell if root of device tree has a matching of_match struct
> + *	@matches:	array of of device match structures to search in
> + *
> + *	Returns the result of of_match_node for the root node.
> + */

I was going to say that this kerneldoc is weirdly formatted, but when I
looked at the other kerneldoc comments in this file it seems that they
use similarly weird formatting...

> +const struct of_device_id *of_match_machine(const struct of_device_id *matches)
> +{
> +	const struct of_device_id *match;
> +	struct device_node *root;
> +
> +	root = of_find_node_by_path("/");
> +	if (!root)
> +		return NULL;
> +
> +	match = of_match_node(matches, root);
> +	of_node_put(root);
> +	return match;
> +}
> +EXPORT_SYMBOL(of_match_machine);

I wonder if of_find_node_by_path("/") is somewhat overkill here. Perhaps
simply of_node_get(of_allnodes) would be more appropriate here since the
function is implemented in the core?

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

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

* [PATCH 1/3] of: Add of_match_machine helper
@ 2014-08-08  9:41       ` Thierry Reding
  0 siblings, 0 replies; 46+ messages in thread
From: Thierry Reding @ 2014-08-08  9:41 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Aug 08, 2014 at 02:01:53AM +0300, Tuomas Tynkkynen wrote:
> Add of_match_machine function to test the device tree root for an
> of_match array. This can be useful when testing SoC versions at runtime,
> for example.
> 
> Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
> ---
>  drivers/of/base.c  | 21 +++++++++++++++++++++
>  include/linux/of.h |  3 +++
>  2 files changed, 24 insertions(+)
> 
> diff --git a/drivers/of/base.c b/drivers/of/base.c
> index d8574ad..37798ea 100644
> --- a/drivers/of/base.c
> +++ b/drivers/of/base.c
> @@ -977,6 +977,27 @@ struct device_node *of_find_matching_node_and_match(struct device_node *from,
>  EXPORT_SYMBOL(of_find_matching_node_and_match);
>  
>  /**
> + * of_match_machine - Tell if root of device tree has a matching of_match struct
> + *	@matches:	array of of device match structures to search in
> + *
> + *	Returns the result of of_match_node for the root node.
> + */

I was going to say that this kerneldoc is weirdly formatted, but when I
looked at the other kerneldoc comments in this file it seems that they
use similarly weird formatting...

> +const struct of_device_id *of_match_machine(const struct of_device_id *matches)
> +{
> +	const struct of_device_id *match;
> +	struct device_node *root;
> +
> +	root = of_find_node_by_path("/");
> +	if (!root)
> +		return NULL;
> +
> +	match = of_match_node(matches, root);
> +	of_node_put(root);
> +	return match;
> +}
> +EXPORT_SYMBOL(of_match_machine);

I wonder if of_find_node_by_path("/") is somewhat overkill here. Perhaps
simply of_node_get(of_allnodes) would be more appropriate here since the
function is implemented in the core?

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140808/67e6af16/attachment.sig>

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

* Re: [PATCH 2/3] soc/tegra: Use of_match_machine in soc_is_tegra()
  2014-08-07 23:01     ` Tuomas Tynkkynen
@ 2014-08-08  9:43       ` Thierry Reding
  -1 siblings, 0 replies; 46+ messages in thread
From: Thierry Reding @ 2014-08-08  9:43 UTC (permalink / raw)
  To: Tuomas Tynkkynen
  Cc: Grant Likely, Rob Herring, Stephen Warren, linux-pm,
	linux-arm-kernel, linux-kernel, devicetree, linux-tegra,
	Rafael J. Wysocki, Daniel Lezcano, Lorenzo Pieralisi

[-- Attachment #1: Type: text/plain, Size: 404 bytes --]

On Fri, Aug 08, 2014 at 02:01:54AM +0300, Tuomas Tynkkynen wrote:
> Use the new helper function, also fixing a device_node refcount leak.
> 
> Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
> ---
>  drivers/soc/tegra/common.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)

Reviewed-by: Thierry Reding <treding@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

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

* [PATCH 2/3] soc/tegra: Use of_match_machine in soc_is_tegra()
@ 2014-08-08  9:43       ` Thierry Reding
  0 siblings, 0 replies; 46+ messages in thread
From: Thierry Reding @ 2014-08-08  9:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Aug 08, 2014 at 02:01:54AM +0300, Tuomas Tynkkynen wrote:
> Use the new helper function, also fixing a device_node refcount leak.
> 
> Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
> ---
>  drivers/soc/tegra/common.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)

Reviewed-by: Thierry Reding <treding@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140808/18991536/attachment.sig>

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

* Re: [PATCH 3/3] cpuidle: big.LITTLE: Use of_match_machine
  2014-08-07 23:01     ` Tuomas Tynkkynen
  (?)
@ 2014-08-08  9:45         ` Thierry Reding
  -1 siblings, 0 replies; 46+ messages in thread
From: Thierry Reding @ 2014-08-08  9:45 UTC (permalink / raw)
  To: Tuomas Tynkkynen
  Cc: Grant Likely, Rob Herring, Stephen Warren,
	linux-pm-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Rafael J. Wysocki,
	Daniel Lezcano, Lorenzo Pieralisi

[-- Attachment #1: Type: text/plain, Size: 451 bytes --]

On Fri, Aug 08, 2014 at 02:01:55AM +0300, Tuomas Tynkkynen wrote:
> Use the new helper function, also fixing a device_node refcount leak.
> 
> Signed-off-by: Tuomas Tynkkynen <ttynkkynen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
> Compile tested only.
> 
>  drivers/cpuidle/cpuidle-big_little.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)

Reviewed-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH 3/3] cpuidle: big.LITTLE: Use of_match_machine
@ 2014-08-08  9:45         ` Thierry Reding
  0 siblings, 0 replies; 46+ messages in thread
From: Thierry Reding @ 2014-08-08  9:45 UTC (permalink / raw)
  To: Tuomas Tynkkynen
  Cc: Grant Likely, Rob Herring, Stephen Warren, linux-pm,
	linux-arm-kernel, linux-kernel, devicetree, linux-tegra,
	Rafael J. Wysocki, Daniel Lezcano, Lorenzo Pieralisi

[-- Attachment #1: Type: text/plain, Size: 393 bytes --]

On Fri, Aug 08, 2014 at 02:01:55AM +0300, Tuomas Tynkkynen wrote:
> Use the new helper function, also fixing a device_node refcount leak.
> 
> Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
> ---
> Compile tested only.
> 
>  drivers/cpuidle/cpuidle-big_little.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)

Reviewed-by: Thierry Reding <treding@nvidia.com>

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

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

* [PATCH 3/3] cpuidle: big.LITTLE: Use of_match_machine
@ 2014-08-08  9:45         ` Thierry Reding
  0 siblings, 0 replies; 46+ messages in thread
From: Thierry Reding @ 2014-08-08  9:45 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Aug 08, 2014 at 02:01:55AM +0300, Tuomas Tynkkynen wrote:
> Use the new helper function, also fixing a device_node refcount leak.
> 
> Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
> ---
> Compile tested only.
> 
>  drivers/cpuidle/cpuidle-big_little.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)

Reviewed-by: Thierry Reding <treding@nvidia.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140808/d9b58a66/attachment.sig>

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

* Re: [PATCH 1/3] of: Add of_match_machine helper
  2014-08-08  9:41       ` Thierry Reding
  (?)
@ 2014-08-08 13:23         ` Tuomas Tynkkynen
  -1 siblings, 0 replies; 46+ messages in thread
From: Tuomas Tynkkynen @ 2014-08-08 13:23 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Grant Likely, Rob Herring, Stephen Warren,
	linux-pm-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Rafael J. Wysocki,
	Daniel Lezcano, Lorenzo Pieralisi



On 08/08/14 12:41, Thierry Reding wrote:
> 
>> +const struct of_device_id *of_match_machine(const struct of_device_id *matches)
>> +{
>> +	const struct of_device_id *match;
>> +	struct device_node *root;
>> +
>> +	root = of_find_node_by_path("/");
>> +	if (!root)
>> +		return NULL;
>> +
>> +	match = of_match_node(matches, root);
>> +	of_node_put(root);
>> +	return match;
>> +}
>> +EXPORT_SYMBOL(of_match_machine);
> 
> I wonder if of_find_node_by_path("/") is somewhat overkill here. Perhaps
> simply of_node_get(of_allnodes) would be more appropriate here since the
> function is implemented in the core?

of_machine_is_compatible() uses of_find_node_by_path("/") as well, of_allnodes
seems to be only used when during iterating. So I'd prefer to have them
consistent.

-- 
nvpublic

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

* Re: [PATCH 1/3] of: Add of_match_machine helper
@ 2014-08-08 13:23         ` Tuomas Tynkkynen
  0 siblings, 0 replies; 46+ messages in thread
From: Tuomas Tynkkynen @ 2014-08-08 13:23 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Grant Likely, Rob Herring, Stephen Warren, linux-pm,
	linux-arm-kernel, linux-kernel, devicetree, linux-tegra,
	Rafael J. Wysocki, Daniel Lezcano, Lorenzo Pieralisi



On 08/08/14 12:41, Thierry Reding wrote:
> 
>> +const struct of_device_id *of_match_machine(const struct of_device_id *matches)
>> +{
>> +	const struct of_device_id *match;
>> +	struct device_node *root;
>> +
>> +	root = of_find_node_by_path("/");
>> +	if (!root)
>> +		return NULL;
>> +
>> +	match = of_match_node(matches, root);
>> +	of_node_put(root);
>> +	return match;
>> +}
>> +EXPORT_SYMBOL(of_match_machine);
> 
> I wonder if of_find_node_by_path("/") is somewhat overkill here. Perhaps
> simply of_node_get(of_allnodes) would be more appropriate here since the
> function is implemented in the core?

of_machine_is_compatible() uses of_find_node_by_path("/") as well, of_allnodes
seems to be only used when during iterating. So I'd prefer to have them
consistent.

-- 
nvpublic

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

* [PATCH 1/3] of: Add of_match_machine helper
@ 2014-08-08 13:23         ` Tuomas Tynkkynen
  0 siblings, 0 replies; 46+ messages in thread
From: Tuomas Tynkkynen @ 2014-08-08 13:23 UTC (permalink / raw)
  To: linux-arm-kernel



On 08/08/14 12:41, Thierry Reding wrote:
> 
>> +const struct of_device_id *of_match_machine(const struct of_device_id *matches)
>> +{
>> +	const struct of_device_id *match;
>> +	struct device_node *root;
>> +
>> +	root = of_find_node_by_path("/");
>> +	if (!root)
>> +		return NULL;
>> +
>> +	match = of_match_node(matches, root);
>> +	of_node_put(root);
>> +	return match;
>> +}
>> +EXPORT_SYMBOL(of_match_machine);
> 
> I wonder if of_find_node_by_path("/") is somewhat overkill here. Perhaps
> simply of_node_get(of_allnodes) would be more appropriate here since the
> function is implemented in the core?

of_machine_is_compatible() uses of_find_node_by_path("/") as well, of_allnodes
seems to be only used when during iterating. So I'd prefer to have them
consistent.

-- 
nvpublic

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

* Re: [PATCH 1/3] of: Add of_match_machine helper
  2014-08-08 13:23         ` Tuomas Tynkkynen
  (?)
@ 2014-08-08 19:01           ` Rob Herring
  -1 siblings, 0 replies; 46+ messages in thread
From: Rob Herring @ 2014-08-08 19:01 UTC (permalink / raw)
  To: Tuomas Tynkkynen
  Cc: Thierry Reding, Grant Likely, Rob Herring, Stephen Warren,
	linux-pm, linux-arm-kernel, linux-kernel, devicetree,
	linux-tegra, Rafael J. Wysocki, Daniel Lezcano,
	Lorenzo Pieralisi

On Fri, Aug 8, 2014 at 8:23 AM, Tuomas Tynkkynen <ttynkkynen@nvidia.com> wrote:
>
>
> On 08/08/14 12:41, Thierry Reding wrote:
>>
>>> +const struct of_device_id *of_match_machine(const struct of_device_id *matches)
>>> +{
>>> +    const struct of_device_id *match;
>>> +    struct device_node *root;
>>> +
>>> +    root = of_find_node_by_path("/");
>>> +    if (!root)
>>> +            return NULL;
>>> +
>>> +    match = of_match_node(matches, root);
>>> +    of_node_put(root);
>>> +    return match;
>>> +}
>>> +EXPORT_SYMBOL(of_match_machine);
>>
>> I wonder if of_find_node_by_path("/") is somewhat overkill here. Perhaps
>> simply of_node_get(of_allnodes) would be more appropriate here since the
>> function is implemented in the core?
>
> of_machine_is_compatible() uses of_find_node_by_path("/") as well, of_allnodes
> seems to be only used when during iterating. So I'd prefer to have them
> consistent.

Agreed.

For the series:

Acked-by: Rob Herring <robh@kernel.org>

Rob

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

* Re: [PATCH 1/3] of: Add of_match_machine helper
@ 2014-08-08 19:01           ` Rob Herring
  0 siblings, 0 replies; 46+ messages in thread
From: Rob Herring @ 2014-08-08 19:01 UTC (permalink / raw)
  To: Tuomas Tynkkynen
  Cc: Thierry Reding, Grant Likely, Rob Herring, Stephen Warren,
	linux-pm, linux-arm-kernel, linux-kernel, devicetree,
	linux-tegra, Rafael J. Wysocki, Daniel Lezcano,
	Lorenzo Pieralisi

On Fri, Aug 8, 2014 at 8:23 AM, Tuomas Tynkkynen <ttynkkynen@nvidia.com> wrote:
>
>
> On 08/08/14 12:41, Thierry Reding wrote:
>>
>>> +const struct of_device_id *of_match_machine(const struct of_device_id *matches)
>>> +{
>>> +    const struct of_device_id *match;
>>> +    struct device_node *root;
>>> +
>>> +    root = of_find_node_by_path("/");
>>> +    if (!root)
>>> +            return NULL;
>>> +
>>> +    match = of_match_node(matches, root);
>>> +    of_node_put(root);
>>> +    return match;
>>> +}
>>> +EXPORT_SYMBOL(of_match_machine);
>>
>> I wonder if of_find_node_by_path("/") is somewhat overkill here. Perhaps
>> simply of_node_get(of_allnodes) would be more appropriate here since the
>> function is implemented in the core?
>
> of_machine_is_compatible() uses of_find_node_by_path("/") as well, of_allnodes
> seems to be only used when during iterating. So I'd prefer to have them
> consistent.

Agreed.

For the series:

Acked-by: Rob Herring <robh@kernel.org>

Rob

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

* [PATCH 1/3] of: Add of_match_machine helper
@ 2014-08-08 19:01           ` Rob Herring
  0 siblings, 0 replies; 46+ messages in thread
From: Rob Herring @ 2014-08-08 19:01 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Aug 8, 2014 at 8:23 AM, Tuomas Tynkkynen <ttynkkynen@nvidia.com> wrote:
>
>
> On 08/08/14 12:41, Thierry Reding wrote:
>>
>>> +const struct of_device_id *of_match_machine(const struct of_device_id *matches)
>>> +{
>>> +    const struct of_device_id *match;
>>> +    struct device_node *root;
>>> +
>>> +    root = of_find_node_by_path("/");
>>> +    if (!root)
>>> +            return NULL;
>>> +
>>> +    match = of_match_node(matches, root);
>>> +    of_node_put(root);
>>> +    return match;
>>> +}
>>> +EXPORT_SYMBOL(of_match_machine);
>>
>> I wonder if of_find_node_by_path("/") is somewhat overkill here. Perhaps
>> simply of_node_get(of_allnodes) would be more appropriate here since the
>> function is implemented in the core?
>
> of_machine_is_compatible() uses of_find_node_by_path("/") as well, of_allnodes
> seems to be only used when during iterating. So I'd prefer to have them
> consistent.

Agreed.

For the series:

Acked-by: Rob Herring <robh@kernel.org>

Rob

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

* Re: [PATCH 1/3] of: Add of_match_machine helper
  2014-08-07 23:01   ` Tuomas Tynkkynen
  (?)
@ 2014-08-17 15:28       ` Grant Likely
  -1 siblings, 0 replies; 46+ messages in thread
From: Grant Likely @ 2014-08-17 15:28 UTC (permalink / raw)
  To: Rob Herring
  Cc: Stephen Warren, Thierry Reding, linux-pm-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Rafael J. Wysocki,
	Daniel Lezcano, Lorenzo Pieralisi, Tuomas Tynkkynen

On Fri, 8 Aug 2014 02:01:53 +0300, Tuomas Tynkkynen <ttynkkynen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:
> Add of_match_machine function to test the device tree root for an
> of_match array. This can be useful when testing SoC versions at runtime,
> for example.
> 
> Signed-off-by: Tuomas Tynkkynen <ttynkkynen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
>  drivers/of/base.c  | 21 +++++++++++++++++++++
>  include/linux/of.h |  3 +++
>  2 files changed, 24 insertions(+)
> 
> diff --git a/drivers/of/base.c b/drivers/of/base.c
> index d8574ad..37798ea 100644
> --- a/drivers/of/base.c
> +++ b/drivers/of/base.c
> @@ -977,6 +977,27 @@ struct device_node *of_find_matching_node_and_match(struct device_node *from,
>  EXPORT_SYMBOL(of_find_matching_node_and_match);
>  
>  /**
> + * of_match_machine - Tell if root of device tree has a matching of_match struct
> + *	@matches:	array of of device match structures to search in
> + *
> + *	Returns the result of of_match_node for the root node.
> + */
> +const struct of_device_id *of_match_machine(const struct of_device_id *matches)
> +{
> +	const struct of_device_id *match;
> +	struct device_node *root;
> +
> +	root = of_find_node_by_path("/");
> +	if (!root)
> +		return NULL;
> +
> +	match = of_match_node(matches, root);
> +	of_node_put(root);
> +	return match;
> +}
> +EXPORT_SYMBOL(of_match_machine);

Too wordy...

	return of_match_node(matches, of_allnodes);

:-)

It could be a static inline, but I don't think it's even worth having a
helper. The callers could just open code the above.

g.

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

* Re: [PATCH 1/3] of: Add of_match_machine helper
@ 2014-08-17 15:28       ` Grant Likely
  0 siblings, 0 replies; 46+ messages in thread
From: Grant Likely @ 2014-08-17 15:28 UTC (permalink / raw)
  To: Tuomas Tynkkynen, Rob Herring
  Cc: Stephen Warren, Thierry Reding, linux-pm, linux-arm-kernel,
	linux-kernel, devicetree, linux-tegra, Rafael J. Wysocki,
	Daniel Lezcano, Lorenzo Pieralisi, Tuomas Tynkkynen

On Fri, 8 Aug 2014 02:01:53 +0300, Tuomas Tynkkynen <ttynkkynen@nvidia.com> wrote:
> Add of_match_machine function to test the device tree root for an
> of_match array. This can be useful when testing SoC versions at runtime,
> for example.
> 
> Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
> ---
>  drivers/of/base.c  | 21 +++++++++++++++++++++
>  include/linux/of.h |  3 +++
>  2 files changed, 24 insertions(+)
> 
> diff --git a/drivers/of/base.c b/drivers/of/base.c
> index d8574ad..37798ea 100644
> --- a/drivers/of/base.c
> +++ b/drivers/of/base.c
> @@ -977,6 +977,27 @@ struct device_node *of_find_matching_node_and_match(struct device_node *from,
>  EXPORT_SYMBOL(of_find_matching_node_and_match);
>  
>  /**
> + * of_match_machine - Tell if root of device tree has a matching of_match struct
> + *	@matches:	array of of device match structures to search in
> + *
> + *	Returns the result of of_match_node for the root node.
> + */
> +const struct of_device_id *of_match_machine(const struct of_device_id *matches)
> +{
> +	const struct of_device_id *match;
> +	struct device_node *root;
> +
> +	root = of_find_node_by_path("/");
> +	if (!root)
> +		return NULL;
> +
> +	match = of_match_node(matches, root);
> +	of_node_put(root);
> +	return match;
> +}
> +EXPORT_SYMBOL(of_match_machine);

Too wordy...

	return of_match_node(matches, of_allnodes);

:-)

It could be a static inline, but I don't think it's even worth having a
helper. The callers could just open code the above.

g.

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

* [PATCH 1/3] of: Add of_match_machine helper
@ 2014-08-17 15:28       ` Grant Likely
  0 siblings, 0 replies; 46+ messages in thread
From: Grant Likely @ 2014-08-17 15:28 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 8 Aug 2014 02:01:53 +0300, Tuomas Tynkkynen <ttynkkynen@nvidia.com> wrote:
> Add of_match_machine function to test the device tree root for an
> of_match array. This can be useful when testing SoC versions at runtime,
> for example.
> 
> Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
> ---
>  drivers/of/base.c  | 21 +++++++++++++++++++++
>  include/linux/of.h |  3 +++
>  2 files changed, 24 insertions(+)
> 
> diff --git a/drivers/of/base.c b/drivers/of/base.c
> index d8574ad..37798ea 100644
> --- a/drivers/of/base.c
> +++ b/drivers/of/base.c
> @@ -977,6 +977,27 @@ struct device_node *of_find_matching_node_and_match(struct device_node *from,
>  EXPORT_SYMBOL(of_find_matching_node_and_match);
>  
>  /**
> + * of_match_machine - Tell if root of device tree has a matching of_match struct
> + *	@matches:	array of of device match structures to search in
> + *
> + *	Returns the result of of_match_node for the root node.
> + */
> +const struct of_device_id *of_match_machine(const struct of_device_id *matches)
> +{
> +	const struct of_device_id *match;
> +	struct device_node *root;
> +
> +	root = of_find_node_by_path("/");
> +	if (!root)
> +		return NULL;
> +
> +	match = of_match_node(matches, root);
> +	of_node_put(root);
> +	return match;
> +}
> +EXPORT_SYMBOL(of_match_machine);

Too wordy...

	return of_match_node(matches, of_allnodes);

:-)

It could be a static inline, but I don't think it's even worth having a
helper. The callers could just open code the above.

g.

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

* Re: [PATCH 1/3] of: Add of_match_machine helper
  2014-08-08 19:01           ` Rob Herring
  (?)
@ 2014-08-17 15:31             ` Grant Likely
  -1 siblings, 0 replies; 46+ messages in thread
From: Grant Likely @ 2014-08-17 15:31 UTC (permalink / raw)
  To: Rob Herring, Tuomas Tynkkynen
  Cc: Thierry Reding, Rob Herring, Stephen Warren, linux-pm,
	linux-arm-kernel, linux-kernel, devicetree, linux-tegra,
	Rafael J. Wysocki, Daniel Lezcano, Lorenzo Pieralisi

On Fri, 8 Aug 2014 14:01:57 -0500, Rob Herring <robherring2@gmail.com> wrote:
> On Fri, Aug 8, 2014 at 8:23 AM, Tuomas Tynkkynen <ttynkkynen@nvidia.com> wrote:
> >
> >
> > On 08/08/14 12:41, Thierry Reding wrote:
> >>
> >>> +const struct of_device_id *of_match_machine(const struct of_device_id *matches)
> >>> +{
> >>> +    const struct of_device_id *match;
> >>> +    struct device_node *root;
> >>> +
> >>> +    root = of_find_node_by_path("/");
> >>> +    if (!root)
> >>> +            return NULL;
> >>> +
> >>> +    match = of_match_node(matches, root);
> >>> +    of_node_put(root);
> >>> +    return match;
> >>> +}
> >>> +EXPORT_SYMBOL(of_match_machine);
> >>
> >> I wonder if of_find_node_by_path("/") is somewhat overkill here. Perhaps
> >> simply of_node_get(of_allnodes) would be more appropriate here since the
> >> function is implemented in the core?
> >
> > of_machine_is_compatible() uses of_find_node_by_path("/") as well, of_allnodes
> > seems to be only used when during iterating. So I'd prefer to have them
> > consistent.
> 
> Agreed.

Disagreed. of_machine_is_compatible should be simplified.

g.

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

* Re: [PATCH 1/3] of: Add of_match_machine helper
@ 2014-08-17 15:31             ` Grant Likely
  0 siblings, 0 replies; 46+ messages in thread
From: Grant Likely @ 2014-08-17 15:31 UTC (permalink / raw)
  To: Rob Herring, Tuomas Tynkkynen
  Cc: Thierry Reding, Rob Herring, Stephen Warren, linux-pm,
	linux-arm-kernel, linux-kernel, devicetree, linux-tegra,
	Rafael J. Wysocki, Daniel Lezcano, Lorenzo Pieralisi

On Fri, 8 Aug 2014 14:01:57 -0500, Rob Herring <robherring2@gmail.com> wrote:
> On Fri, Aug 8, 2014 at 8:23 AM, Tuomas Tynkkynen <ttynkkynen@nvidia.com> wrote:
> >
> >
> > On 08/08/14 12:41, Thierry Reding wrote:
> >>
> >>> +const struct of_device_id *of_match_machine(const struct of_device_id *matches)
> >>> +{
> >>> +    const struct of_device_id *match;
> >>> +    struct device_node *root;
> >>> +
> >>> +    root = of_find_node_by_path("/");
> >>> +    if (!root)
> >>> +            return NULL;
> >>> +
> >>> +    match = of_match_node(matches, root);
> >>> +    of_node_put(root);
> >>> +    return match;
> >>> +}
> >>> +EXPORT_SYMBOL(of_match_machine);
> >>
> >> I wonder if of_find_node_by_path("/") is somewhat overkill here. Perhaps
> >> simply of_node_get(of_allnodes) would be more appropriate here since the
> >> function is implemented in the core?
> >
> > of_machine_is_compatible() uses of_find_node_by_path("/") as well, of_allnodes
> > seems to be only used when during iterating. So I'd prefer to have them
> > consistent.
> 
> Agreed.

Disagreed. of_machine_is_compatible should be simplified.

g.

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

* [PATCH 1/3] of: Add of_match_machine helper
@ 2014-08-17 15:31             ` Grant Likely
  0 siblings, 0 replies; 46+ messages in thread
From: Grant Likely @ 2014-08-17 15:31 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 8 Aug 2014 14:01:57 -0500, Rob Herring <robherring2@gmail.com> wrote:
> On Fri, Aug 8, 2014 at 8:23 AM, Tuomas Tynkkynen <ttynkkynen@nvidia.com> wrote:
> >
> >
> > On 08/08/14 12:41, Thierry Reding wrote:
> >>
> >>> +const struct of_device_id *of_match_machine(const struct of_device_id *matches)
> >>> +{
> >>> +    const struct of_device_id *match;
> >>> +    struct device_node *root;
> >>> +
> >>> +    root = of_find_node_by_path("/");
> >>> +    if (!root)
> >>> +            return NULL;
> >>> +
> >>> +    match = of_match_node(matches, root);
> >>> +    of_node_put(root);
> >>> +    return match;
> >>> +}
> >>> +EXPORT_SYMBOL(of_match_machine);
> >>
> >> I wonder if of_find_node_by_path("/") is somewhat overkill here. Perhaps
> >> simply of_node_get(of_allnodes) would be more appropriate here since the
> >> function is implemented in the core?
> >
> > of_machine_is_compatible() uses of_find_node_by_path("/") as well, of_allnodes
> > seems to be only used when during iterating. So I'd prefer to have them
> > consistent.
> 
> Agreed.

Disagreed. of_machine_is_compatible should be simplified.

g.

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

* Re: [PATCH 1/3] of: Add of_match_machine helper
  2014-08-17 15:28       ` Grant Likely
  (?)
@ 2014-08-18 10:10         ` Tuomas Tynkkynen
  -1 siblings, 0 replies; 46+ messages in thread
From: Tuomas Tynkkynen @ 2014-08-18 10:10 UTC (permalink / raw)
  To: Grant Likely
  Cc: devicetree, Daniel Lezcano, linux-pm, Stephen Warren,
	Rafael J. Wysocki, linux-kernel, Rob Herring, Thierry Reding,
	linux-tegra, Lorenzo Pieralisi, linux-arm-kernel

On 17/08/14 18:28, Grant Likely wrote:
> On Fri, 8 Aug 2014 02:01:53 +0300, Tuomas Tynkkynen <ttynkkynen@nvidia.com> wrote:
[...]
>> +EXPORT_SYMBOL(of_match_machine);
> 
> Too wordy...
> 
> 	return of_match_node(matches, of_allnodes);
> 
> :-)
> 
> It could be a static inline, but I don't think it's even worth having a
> helper. The callers could just open code the above.
> 

Do you mean all the drivers should be referring to of_allnodes directly?
I see that it's indeed exported, but to me that sounds like relying too
much on an implementation detail. In fact, Documentation/devicetree/todo.txt
even seems to have a TODO entry for its removal ("Remove of_allnodes list
and iterate using list of child nodes alone").

-- 
nvpublic

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

* Re: [PATCH 1/3] of: Add of_match_machine helper
@ 2014-08-18 10:10         ` Tuomas Tynkkynen
  0 siblings, 0 replies; 46+ messages in thread
From: Tuomas Tynkkynen @ 2014-08-18 10:10 UTC (permalink / raw)
  To: Grant Likely
  Cc: Rob Herring, Stephen Warren, Thierry Reding, linux-pm,
	linux-arm-kernel, linux-kernel, devicetree, linux-tegra,
	Rafael J. Wysocki, Daniel Lezcano, Lorenzo Pieralisi

On 17/08/14 18:28, Grant Likely wrote:
> On Fri, 8 Aug 2014 02:01:53 +0300, Tuomas Tynkkynen <ttynkkynen@nvidia.com> wrote:
[...]
>> +EXPORT_SYMBOL(of_match_machine);
> 
> Too wordy...
> 
> 	return of_match_node(matches, of_allnodes);
> 
> :-)
> 
> It could be a static inline, but I don't think it's even worth having a
> helper. The callers could just open code the above.
> 

Do you mean all the drivers should be referring to of_allnodes directly?
I see that it's indeed exported, but to me that sounds like relying too
much on an implementation detail. In fact, Documentation/devicetree/todo.txt
even seems to have a TODO entry for its removal ("Remove of_allnodes list
and iterate using list of child nodes alone").

-- 
nvpublic

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

* [PATCH 1/3] of: Add of_match_machine helper
@ 2014-08-18 10:10         ` Tuomas Tynkkynen
  0 siblings, 0 replies; 46+ messages in thread
From: Tuomas Tynkkynen @ 2014-08-18 10:10 UTC (permalink / raw)
  To: linux-arm-kernel

On 17/08/14 18:28, Grant Likely wrote:
> On Fri, 8 Aug 2014 02:01:53 +0300, Tuomas Tynkkynen <ttynkkynen@nvidia.com> wrote:
[...]
>> +EXPORT_SYMBOL(of_match_machine);
> 
> Too wordy...
> 
> 	return of_match_node(matches, of_allnodes);
> 
> :-)
> 
> It could be a static inline, but I don't think it's even worth having a
> helper. The callers could just open code the above.
> 

Do you mean all the drivers should be referring to of_allnodes directly?
I see that it's indeed exported, but to me that sounds like relying too
much on an implementation detail. In fact, Documentation/devicetree/todo.txt
even seems to have a TODO entry for its removal ("Remove of_allnodes list
and iterate using list of child nodes alone").

-- 
nvpublic

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

* Re: [PATCH 0/3] Introduce of_match_machine() helper
  2014-08-07 23:01 ` Tuomas Tynkkynen
@ 2014-08-25 17:45   ` Stephen Warren
  -1 siblings, 0 replies; 46+ messages in thread
From: Stephen Warren @ 2014-08-25 17:45 UTC (permalink / raw)
  To: Tuomas Tynkkynen
  Cc: Grant Likely, Rob Herring, Thierry Reding, linux-pm,
	linux-arm-kernel, linux-kernel, devicetree, linux-tegra,
	Rafael J. Wysocki, Daniel Lezcano, Lorenzo Pieralisi

On 08/07/2014 05:01 PM, Tuomas Tynkkynen wrote:
> Some mach-specific drivers that don't require their own node in the device tree
> (for example drivers/soc/*, cpufreq, cpuidle etc.) want to match on the device
> tree root compatible property instead. Instead of open-coding (and forgetting
> to call of_node_put on the root node) everywhere, add a helper to the OF core.

Tuomas, I assume there will be a new version of this series to address 
the review comments? For now, I'm not intending on applying this.

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

* [PATCH 0/3] Introduce of_match_machine() helper
@ 2014-08-25 17:45   ` Stephen Warren
  0 siblings, 0 replies; 46+ messages in thread
From: Stephen Warren @ 2014-08-25 17:45 UTC (permalink / raw)
  To: linux-arm-kernel

On 08/07/2014 05:01 PM, Tuomas Tynkkynen wrote:
> Some mach-specific drivers that don't require their own node in the device tree
> (for example drivers/soc/*, cpufreq, cpuidle etc.) want to match on the device
> tree root compatible property instead. Instead of open-coding (and forgetting
> to call of_node_put on the root node) everywhere, add a helper to the OF core.

Tuomas, I assume there will be a new version of this series to address 
the review comments? For now, I'm not intending on applying this.

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

* Re: [PATCH 0/3] Introduce of_match_machine() helper
  2014-08-25 17:45   ` Stephen Warren
  (?)
@ 2014-09-19 13:12       ` Peter De Schrijver
  -1 siblings, 0 replies; 46+ messages in thread
From: Peter De Schrijver @ 2014-09-19 13:12 UTC (permalink / raw)
  To: Stephen Warren
  Cc: Tuomas Tynkkynen, Grant Likely, Rob Herring, Thierry Reding,
	linux-pm-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Rafael J. Wysocki,
	Daniel Lezcano, Lorenzo Pieralisi

On Mon, Aug 25, 2014 at 07:45:38PM +0200, Stephen Warren wrote:
> On 08/07/2014 05:01 PM, Tuomas Tynkkynen wrote:
> > Some mach-specific drivers that don't require their own node in the device tree
> > (for example drivers/soc/*, cpufreq, cpuidle etc.) want to match on the device
> > tree root compatible property instead. Instead of open-coding (and forgetting
> > to call of_node_put on the root node) everywhere, add a helper to the OF core.
> 
> Tuomas, I assume there will be a new version of this series to address 
> the review comments? For now, I'm not intending on applying this.

Given that Tuomas's internship ended, I'm willing to push this patch set
forward, if there is interest. So are people still interested in this idea
or should we drop it?

Thanks,

Peter.

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

* Re: [PATCH 0/3] Introduce of_match_machine() helper
@ 2014-09-19 13:12       ` Peter De Schrijver
  0 siblings, 0 replies; 46+ messages in thread
From: Peter De Schrijver @ 2014-09-19 13:12 UTC (permalink / raw)
  To: Stephen Warren
  Cc: Tuomas Tynkkynen, Grant Likely, Rob Herring, Thierry Reding,
	linux-pm, linux-arm-kernel, linux-kernel, devicetree,
	linux-tegra, Rafael J. Wysocki, Daniel Lezcano,
	Lorenzo Pieralisi

On Mon, Aug 25, 2014 at 07:45:38PM +0200, Stephen Warren wrote:
> On 08/07/2014 05:01 PM, Tuomas Tynkkynen wrote:
> > Some mach-specific drivers that don't require their own node in the device tree
> > (for example drivers/soc/*, cpufreq, cpuidle etc.) want to match on the device
> > tree root compatible property instead. Instead of open-coding (and forgetting
> > to call of_node_put on the root node) everywhere, add a helper to the OF core.
> 
> Tuomas, I assume there will be a new version of this series to address 
> the review comments? For now, I'm not intending on applying this.

Given that Tuomas's internship ended, I'm willing to push this patch set
forward, if there is interest. So are people still interested in this idea
or should we drop it?

Thanks,

Peter.

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

* [PATCH 0/3] Introduce of_match_machine() helper
@ 2014-09-19 13:12       ` Peter De Schrijver
  0 siblings, 0 replies; 46+ messages in thread
From: Peter De Schrijver @ 2014-09-19 13:12 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Aug 25, 2014 at 07:45:38PM +0200, Stephen Warren wrote:
> On 08/07/2014 05:01 PM, Tuomas Tynkkynen wrote:
> > Some mach-specific drivers that don't require their own node in the device tree
> > (for example drivers/soc/*, cpufreq, cpuidle etc.) want to match on the device
> > tree root compatible property instead. Instead of open-coding (and forgetting
> > to call of_node_put on the root node) everywhere, add a helper to the OF core.
> 
> Tuomas, I assume there will be a new version of this series to address 
> the review comments? For now, I'm not intending on applying this.

Given that Tuomas's internship ended, I'm willing to push this patch set
forward, if there is interest. So are people still interested in this idea
or should we drop it?

Thanks,

Peter.

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

* Re: [PATCH 0/3] Introduce of_match_machine() helper
  2014-09-19 13:12       ` Peter De Schrijver
  (?)
@ 2014-09-24  7:44         ` Peter De Schrijver
  -1 siblings, 0 replies; 46+ messages in thread
From: Peter De Schrijver @ 2014-09-24  7:44 UTC (permalink / raw)
  To: Stephen Warren
  Cc: Tuomas Tynkkynen, Grant Likely, Rob Herring, Thierry Reding,
	linux-pm, linux-arm-kernel, linux-kernel, devicetree,
	linux-tegra, Rafael J. Wysocki, Daniel Lezcano,
	Lorenzo Pieralisi

On Fri, Sep 19, 2014 at 04:12:45PM +0300, Peter De Schrijver wrote:
> On Mon, Aug 25, 2014 at 07:45:38PM +0200, Stephen Warren wrote:
> > On 08/07/2014 05:01 PM, Tuomas Tynkkynen wrote:
> > > Some mach-specific drivers that don't require their own node in the device tree
> > > (for example drivers/soc/*, cpufreq, cpuidle etc.) want to match on the device
> > > tree root compatible property instead. Instead of open-coding (and forgetting
> > > to call of_node_put on the root node) everywhere, add a helper to the OF core.
> > 
> > Tuomas, I assume there will be a new version of this series to address 
> > the review comments? For now, I'm not intending on applying this.
> 
> Given that Tuomas's internship ended, I'm willing to push this patch set
> forward, if there is interest. So are people still interested in this idea
> or should we drop it?

Seems there's no interest. I won't bother with this then.

Cheers,

Peter.

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

* Re: [PATCH 0/3] Introduce of_match_machine() helper
@ 2014-09-24  7:44         ` Peter De Schrijver
  0 siblings, 0 replies; 46+ messages in thread
From: Peter De Schrijver @ 2014-09-24  7:44 UTC (permalink / raw)
  To: Stephen Warren
  Cc: Tuomas Tynkkynen, Grant Likely, Rob Herring, Thierry Reding,
	linux-pm, linux-arm-kernel, linux-kernel, devicetree,
	linux-tegra, Rafael J. Wysocki, Daniel Lezcano,
	Lorenzo Pieralisi

On Fri, Sep 19, 2014 at 04:12:45PM +0300, Peter De Schrijver wrote:
> On Mon, Aug 25, 2014 at 07:45:38PM +0200, Stephen Warren wrote:
> > On 08/07/2014 05:01 PM, Tuomas Tynkkynen wrote:
> > > Some mach-specific drivers that don't require their own node in the device tree
> > > (for example drivers/soc/*, cpufreq, cpuidle etc.) want to match on the device
> > > tree root compatible property instead. Instead of open-coding (and forgetting
> > > to call of_node_put on the root node) everywhere, add a helper to the OF core.
> > 
> > Tuomas, I assume there will be a new version of this series to address 
> > the review comments? For now, I'm not intending on applying this.
> 
> Given that Tuomas's internship ended, I'm willing to push this patch set
> forward, if there is interest. So are people still interested in this idea
> or should we drop it?

Seems there's no interest. I won't bother with this then.

Cheers,

Peter.

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

* [PATCH 0/3] Introduce of_match_machine() helper
@ 2014-09-24  7:44         ` Peter De Schrijver
  0 siblings, 0 replies; 46+ messages in thread
From: Peter De Schrijver @ 2014-09-24  7:44 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Sep 19, 2014 at 04:12:45PM +0300, Peter De Schrijver wrote:
> On Mon, Aug 25, 2014 at 07:45:38PM +0200, Stephen Warren wrote:
> > On 08/07/2014 05:01 PM, Tuomas Tynkkynen wrote:
> > > Some mach-specific drivers that don't require their own node in the device tree
> > > (for example drivers/soc/*, cpufreq, cpuidle etc.) want to match on the device
> > > tree root compatible property instead. Instead of open-coding (and forgetting
> > > to call of_node_put on the root node) everywhere, add a helper to the OF core.
> > 
> > Tuomas, I assume there will be a new version of this series to address 
> > the review comments? For now, I'm not intending on applying this.
> 
> Given that Tuomas's internship ended, I'm willing to push this patch set
> forward, if there is interest. So are people still interested in this idea
> or should we drop it?

Seems there's no interest. I won't bother with this then.

Cheers,

Peter.

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

end of thread, other threads:[~2014-09-24  7:44 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-07 23:01 [PATCH 0/3] Introduce of_match_machine() helper Tuomas Tynkkynen
2014-08-07 23:01 ` Tuomas Tynkkynen
2014-08-07 23:01 ` Tuomas Tynkkynen
2014-08-07 23:01 ` [PATCH 1/3] of: Add of_match_machine helper Tuomas Tynkkynen
2014-08-07 23:01   ` Tuomas Tynkkynen
2014-08-07 23:01   ` Tuomas Tynkkynen
     [not found]   ` <1407452515-2390-2-git-send-email-ttynkkynen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-08-08  9:41     ` Thierry Reding
2014-08-08  9:41       ` Thierry Reding
2014-08-08  9:41       ` Thierry Reding
2014-08-08 13:23       ` Tuomas Tynkkynen
2014-08-08 13:23         ` Tuomas Tynkkynen
2014-08-08 13:23         ` Tuomas Tynkkynen
2014-08-08 19:01         ` Rob Herring
2014-08-08 19:01           ` Rob Herring
2014-08-08 19:01           ` Rob Herring
2014-08-17 15:31           ` Grant Likely
2014-08-17 15:31             ` Grant Likely
2014-08-17 15:31             ` Grant Likely
2014-08-17 15:28     ` Grant Likely
2014-08-17 15:28       ` Grant Likely
2014-08-17 15:28       ` Grant Likely
2014-08-18 10:10       ` Tuomas Tynkkynen
2014-08-18 10:10         ` Tuomas Tynkkynen
2014-08-18 10:10         ` Tuomas Tynkkynen
     [not found] ` <1407452515-2390-1-git-send-email-ttynkkynen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-08-07 23:01   ` [PATCH 2/3] soc/tegra: Use of_match_machine in soc_is_tegra() Tuomas Tynkkynen
2014-08-07 23:01     ` Tuomas Tynkkynen
2014-08-07 23:01     ` Tuomas Tynkkynen
     [not found]     ` <1407452515-2390-3-git-send-email-ttynkkynen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-08-07 23:28       ` Stephen Warren
2014-08-07 23:28         ` Stephen Warren
2014-08-07 23:28         ` Stephen Warren
2014-08-08  9:43     ` Thierry Reding
2014-08-08  9:43       ` Thierry Reding
2014-08-07 23:01   ` [PATCH 3/3] cpuidle: big.LITTLE: Use of_match_machine Tuomas Tynkkynen
2014-08-07 23:01     ` Tuomas Tynkkynen
2014-08-07 23:01     ` Tuomas Tynkkynen
     [not found]     ` <1407452515-2390-4-git-send-email-ttynkkynen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-08-08  9:45       ` Thierry Reding
2014-08-08  9:45         ` Thierry Reding
2014-08-08  9:45         ` Thierry Reding
2014-08-25 17:45 ` [PATCH 0/3] Introduce of_match_machine() helper Stephen Warren
2014-08-25 17:45   ` Stephen Warren
     [not found]   ` <53FB7642.1000808-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2014-09-19 13:12     ` Peter De Schrijver
2014-09-19 13:12       ` Peter De Schrijver
2014-09-19 13:12       ` Peter De Schrijver
2014-09-24  7:44       ` Peter De Schrijver
2014-09-24  7:44         ` Peter De Schrijver
2014-09-24  7:44         ` Peter De Schrijver

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.