aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/of.h
diff options
context:
space:
mode:
authorThomas Abraham <thomas.abraham@linaro.org>2011-06-30 11:56:10 -0400
committerGrant Likely <grant.likely@secretlab.ca>2011-06-30 15:02:10 -0400
commita3b853633d78c3930b513ee219df48637ac82eed (patch)
tree30d36c4b3e03db070f72eeaeed3f2d1dd1da159b /include/linux/of.h
parent7423734e19e7e0a90e3379152eacca2647f4377e (diff)
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>
Diffstat (limited to 'include/linux/of.h')
-rw-r--r--include/linux/of.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/of.h b/include/linux/of.h
index bfc0ed1b0ced..4fc4c1b8d5d5 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -195,6 +195,10 @@ extern struct device_node *of_find_node_with_property(
195extern struct property *of_find_property(const struct device_node *np, 195extern struct property *of_find_property(const struct device_node *np,
196 const char *name, 196 const char *name,
197 int *lenp); 197 int *lenp);
198extern int of_property_read_u32(struct device_node *np, char *propname,
199 u32 *out_value);
200extern int of_property_read_string(struct device_node *np, char *propname,
201 char **out_string);
198extern int of_device_is_compatible(const struct device_node *device, 202extern int of_device_is_compatible(const struct device_node *device,
199 const char *); 203 const char *);
200extern int of_device_is_available(const struct device_node *device); 204extern int of_device_is_available(const struct device_node *device);