Stephen Warren c541adc637 dt: add property iteration helpers
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@gmail.com>

Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-04-18 13:53:11 +02:00
..
2012-04-18 13:53:11 +02:00
2012-02-27 10:09:25 -06:00
2012-03-28 12:34:33 -07:00
2010-12-24 01:28:54 -07:00
2012-02-27 10:09:52 -06:00
2011-10-31 19:31:55 -04:00
2011-12-27 16:37:30 -06:00