diff options
author | Stephen Warren <swarren@nvidia.com> | 2012-04-04 17:27:46 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-04-18 13:53:11 +0200 |
commit | c541adc637066407d4cda9db14dcb0e618966a4c (patch) | |
tree | 0fda4e8f97c9e9a2a61524f3bb390a0a6b04ccbe /Documentation | |
parent | pinctrl: implement pinctrl deferred probing (diff) | |
download | linux-c541adc637066407d4cda9db14dcb0e618966a4c.tar.xz linux-c541adc637066407d4cda9db14dcb0e618966a4c.zip |
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>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions