dt: add helper functions to read u32 and string property values

Add helper functions to retrieve unsigned integer and string property
values from properties of a device node. These helper functions can be
used to lookup a property in a device node, perform error checking and
read the property value.

[grant.likely@secretlab.ca: Proposal and initial implementation]
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
[grant.likely: some word smithing and be more defensive validating the string]
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
diff --git a/include/linux/of.h b/include/linux/of.h
index bfc0ed1..4fc4c1b 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -195,6 +195,10 @@
 extern struct property *of_find_property(const struct device_node *np,
 					 const char *name,
 					 int *lenp);
+extern int of_property_read_u32(struct device_node *np, char *propname,
+					u32 *out_value);
+extern int of_property_read_string(struct device_node *np, char *propname,
+					char **out_string);
 extern int of_device_is_compatible(const struct device_node *device,
 				   const char *);
 extern int of_device_is_available(const struct device_node *device);