Guest User

Untitled

a guest
Aug 8th, 2018
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. commit 9c2a3c9e4e0c3994c82bdb6b3278cdcd0cb2068b
  2. Author: Stephen Warren <[email protected]>
  3. Date: Wed Apr 4 09:27:46 2012 -0600
  4.  
  5. dt: add property iteration helpers
  6.  
  7. This patch adds macros of_property_for_each_u32() and
  8. of_property_for_each_string(), which iterate over an array of values
  9. within a device-tree property. Usage is for example:
  10.  
  11. struct property *prop;
  12. const __be32 *p;
  13. u32 u;
  14. of_property_for_each_u32(np, "propname", prop, p, u)
  15. printk("U32 value: %x\n", u);
  16.  
  17. struct property *prop;
  18. const char *s;
  19. of_property_for_each_string(np, "propname", prop, s)
  20. printk("String value: %s\n", s);
  21.  
  22. Based on work by Rob Herring <[email protected]>
  23.  
  24. Cc: Grant Likely <[email protected]>
  25. Signed-off-by: Stephen Warren <[email protected]>
  26. Acked-by: Rob Herring <[email protected]>
  27. Signed-off-by: Linus Walleij <[email protected]>
Add Comment
Please, Sign In to add comment