]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - include/libfdt.h
libfdt: Add a function to write a property placeholder
[people/ms/u-boot.git] / include / libfdt.h
index e48c21aced0288a4fca14b3dd6ac3e797691d676..74b1d149c2dde2d3b9b72fba0dd1cbb6c47ac664 100644 (file)
@@ -1181,6 +1181,22 @@ static inline int fdt_property_cell(void *fdt, const char *name, uint32_t val)
 {
        return fdt_property_u32(fdt, name, val);
 }
+
+/**
+ * fdt_property_placeholder - add a new property and return a ptr to its value
+ *
+ * @fdt: pointer to the device tree blob
+ * @name: name of property to add
+ * @len: length of property value in bytes
+ * @valp: returns a pointer to where where the value should be placed
+ *
+ * returns:
+ *     0, on success
+ *     -FDT_ERR_BADMAGIC,
+ *     -FDT_ERR_NOSPACE, standard meanings
+ */
+int fdt_property_placeholder(void *fdt, const char *name, int len, void **valp);
+
 #define fdt_property_string(fdt, name, str) \
        fdt_property(fdt, name, str, strlen(str)+1)
 int fdt_end_node(void *fdt);