summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-02-21 00:18:38 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2013-03-06 11:41:28 +0100
commitc2189e9f7ef2c4b9185844e562c015c87e7affc4 (patch)
treefeced837eda590d4e11fc24e73d9b70ea1fc4a38 /include
parent3e797d70811a868eaae178c53f495bc69ba36a6f (diff)
downloadbarebox-c2189e9f7ef2c4b9185844e562c015c87e7affc4.tar.gz
barebox-c2189e9f7ef2c4b9185844e562c015c87e7affc4.tar.xz
of: Add of property write functions for u32
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/of.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/of.h b/include/of.h
index fe9f65dc4a..eeea01615f 100644
--- a/include/of.h
+++ b/include/of.h
@@ -124,6 +124,17 @@ static inline int of_property_read_u32(const struct device_node *np,
return of_property_read_u32_array(np, propname, out_value, 1);
}
+int of_property_write_u32_array(struct device_node *np,
+ const char *propname, const u32 *values,
+ size_t sz);
+
+static inline int of_property_write_u32(struct device_node *np,
+ const char *propname,
+ u32 value)
+{
+ return of_property_write_u32_array(np, propname, &value, 1);
+}
+
const void *of_get_property(const struct device_node *np, const char *name,
int *lenp);