summaryrefslogtreecommitdiff
path: root/drivers/of/base.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@linaro.org>2013-10-11 21:05:10 (GMT)
committerGrant Likely <grant.likely@linaro.org>2013-10-24 10:43:13 (GMT)
commit624cfca534f9b1ffb1326617b4e973a3d5ecff4a (patch)
treeff8d3861219a84bea05967bbf80ac726355445d4 /drivers/of/base.c
parent2361613206e66ce59cc0e08efa8d98ec15b84ed1 (diff)
downloadlinux-fsl-qoriq-624cfca534f9b1ffb1326617b4e973a3d5ecff4a.tar.xz
of: Add helper for printing an of_phandle_args structure
It is sometimes useful for debug to get the contents of an of_phandle_args structure out into the kernel log. Signed-off-by: Grant Likely <grant.likely@linaro.org>
Diffstat (limited to 'drivers/of/base.c')
-rw-r--r--drivers/of/base.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 3ae106d..021db96 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1185,6 +1185,15 @@ int of_property_count_strings(struct device_node *np, const char *propname)
}
EXPORT_SYMBOL_GPL(of_property_count_strings);
+void of_print_phandle_args(const char *msg, const struct of_phandle_args *args)
+{
+ int i;
+ printk("%s %s", msg, of_node_full_name(args->np));
+ for (i = 0; i < args->args_count; i++)
+ printk(i ? ",%08x" : ":%08x", args->args[i]);
+ printk("\n");
+}
+
static int __of_parse_phandle_with_args(const struct device_node *np,
const char *list_name,
const char *cells_name,