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

Linus Walleij linus.walleij at linaro.org
Wed Apr 11 18:07:12 EST 2012


On Mon, Apr 9, 2012 at 12:46 PM, Jean-Christophe PLAGNIOL-VILLARD
<plagnioj at jcrosoft.com> 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 <robherring2 at gmail.com>
>
> Signed-off-by: Stephen Warren <swarren at wwwdotorg.org>
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
> ---
> 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


More information about the devicetree-discuss mailing list