Thread (1 message) 1 message, 1 author, 2012-04-11

Re: [PATCH 1/1 v3] dt: add property iteration helpers

From: Linus Walleij <hidden>
Date: 2012-04-11 08:07:12

On Mon, Apr 9, 2012 at 12:46 PM, Jean-Christophe PLAGNIOL-VILLARD
[off-list ref] wrote:
This patch adds macros of_property_for_each_u32() and
of_property_for_each_string(), which iterate over an array of values
within a device-tree property. Usage is for example:

struct property *prop;
const __be32 *p;
u32 u;
of_property_for_each_u32(np, "propname", prop, p, u)
       printk("U32 value: %x\n", u);

struct property *prop;
const char *s;
of_property_for_each_string(np, "propname", prop, s)
       printk("String value: %s\n", s);

Based on work by Rob Herring [off-list ref]

Signed-off-by: Stephen Warren <redacted>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj-sclMFOaUSTBWk0Htik3J/w@public.gmane.org>
---
I need it for at91 for the interrupt controller
and pinctrl
This is merged into the pinctrl tree now anyway, can I add your
Acked-by:?

Yours,
Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help