Lines Matching +full:device +full:- +full:tree
1 /* SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) */
5 * libfdt - Flat Device Tree manipulation
26 /* FDT_ERR_NOSPACE: Operation needed to expand the device
27 * tree, but its buffer did not have sufficient space to
28 * contain the expanded tree. Use fdt_open_into() to move the
29 * device tree to a buffer with more space. */
34 * offset which is out-of-bounds, or which points to an
43 * length, or the phandle value was either 0 or -1, which are
46 /* FDT_ERR_BADSTATE: Function was passed an incomplete device
47 * tree created by the sequential-write functions, which is
50 /* Error codes: codes for bad device tree blobs */
52 /* FDT_ERR_TRUNCATED: FDT or a sub-block is improperly
56 /* FDT_ERR_BADMAGIC: Given "device tree" appears not to be a
57 * device tree at all - it is missing the flattened device
58 * tree magic number. */
60 /* FDT_ERR_BADVERSION: Given device tree has a version which
62 * read-write functions, this may mean that fdt_open_into() is
63 * required to convert the tree to the expected version. */
65 /* FDT_ERR_BADSTRUCTURE: Given device tree has a corrupt
69 /* FDT_ERR_BADLAYOUT: For read-write functions, the given
70 * device tree has it's sub-blocks in an order that the
72 * then strings). Use fdt_open_into() to reorganize the tree
73 * into a form suitable for the read-write operations. */
81 /* Errors in device tree content */
83 /* FDT_ERR_BADNCELLS: Device tree has a #address-cells, #size-cells
87 /* FDT_ERR_BADVALUE: Device tree has a property with an unexpected
89 * is not NUL-terminated within the length of its value. */
92 /* FDT_ERR_BADOVERLAY: The device tree overlay, while
97 /* FDT_ERR_NOPHANDLES: The device tree doesn't have any
108 /* Valid values for phandles range from 1 to 2^32-2. */
111 /* Low-level functions (you probably don't need these) */
126 * These helpers access words from a device tree blob. They're
186 * fdt_first_subnode() - get offset of first direct subnode
190 * @return offset of first subnode, or -FDT_ERR_NOTFOUND if there is none
195 * fdt_next_subnode() - get offset of next direct subnode
202 * @return offset of next subnode, or -FDT_ERR_NOTFOUND if there are no more
208 * fdt_for_each_subnode - iterate over all subnodes of a parent
221 * if ((node < 0) && (node != -FDT_ERR_NOTFOUND)) {
239 (fdt32_ld(&((const struct fdt_header *)(fdt))->field))
255 fdth->name = cpu_to_fdt32(val); \
270 * fdt_header_size - return the size of the tree's header
271 * @fdt: pointer to a flattened device tree
276 * fdt_header_size_ - internal function which takes a version number
281 * fdt_check_header - sanity check a device tree header
283 * @fdt: pointer to data which might be a flattened device tree
286 * appears to be a flattened device tree, and that the header contains
291 * 0, if the buffer appears to contain a valid device tree
292 * -FDT_ERR_BADMAGIC,
293 * -FDT_ERR_BADVERSION,
294 * -FDT_ERR_BADSTATE,
295 * -FDT_ERR_TRUNCATED, standard meanings, as above
300 * fdt_move - move a device tree around in memory
301 * @fdt: pointer to the device tree to move
302 * @buf: pointer to memory where the device is to be moved
305 * fdt_move() relocates, if possible, the device tree blob located at
307 * with the existing device tree blob at fdt. Therefore,
313 * -FDT_ERR_NOSPACE, bufsize is insufficient to contain the device tree
314 * -FDT_ERR_BADMAGIC,
315 * -FDT_ERR_BADVERSION,
316 * -FDT_ERR_BADSTATE, standard meanings
321 /* Read-only functions */
327 * fdt_get_string - retrieve a string from the strings block of a device tree
328 * @fdt: pointer to the device tree blob
333 * strings block of the device tree blob at fdt, and optionally also
343 * fdt_string - retrieve a string from the strings block of a device tree
344 * @fdt: pointer to the device tree blob
348 * strings block of the device tree blob at fdt.
357 * fdt_find_max_phandle - find and return the highest phandle in a tree
358 * @fdt: pointer to the device tree blob
359 * @phandle: return location for the highest phandle value found in the tree
361 * fdt_find_max_phandle() finds the highest phandle value in the given device
362 * tree. The value returned in @phandle is only valid if the function returns
371 * fdt_get_max_phandle - retrieves the highest phandle in a tree
372 * @fdt: pointer to the device tree blob
375 * device tree. This will ignore badly formatted phandles, or phandles
376 * with a value of 0 or -1.
382 * 0, if no phandle was found in the device tree
383 * -1, if an error occurred
392 return (uint32_t)-1; in fdt_get_max_phandle()
398 * fdt_generate_phandle - return a new, unused phandle for a device tree blob
399 * @fdt: pointer to the device tree blob
402 * Walks the device tree blob and looks for the highest phandle value. On
404 * highest phandle value in the device tree blob) will be returned in the
408 * 0 on success or a negative error-code on failure
413 * fdt_num_mem_rsv - retrieve the number of memory reserve map entries
414 * @fdt: pointer to the device tree blob
416 * Returns the number of entries in the device tree blob's memory
426 * fdt_get_mem_rsv - retrieve one memory reserve map entry
427 * @fdt: pointer to the device tree blob
428 * @address, @size: pointers to 64-bit variables
431 * the n-th reserve map entry from the device tree blob, in
432 * native-endian format.
436 * -FDT_ERR_BADMAGIC,
437 * -FDT_ERR_BADVERSION,
438 * -FDT_ERR_BADSTATE, standard meanings
443 * fdt_subnode_offset_namelen - find a subnode based on substring
444 * @fdt: pointer to the device tree blob
459 * fdt_subnode_offset - find a subnode of a given node
460 * @fdt: pointer to the device tree blob
473 * -FDT_ERR_NOTFOUND, if the requested subnode does not exist
474 * -FDT_ERR_BADOFFSET, if parentoffset did not point to an FDT_BEGIN_NODE
476 * -FDT_ERR_BADMAGIC,
477 * -FDT_ERR_BADVERSION,
478 * -FDT_ERR_BADSTATE,
479 * -FDT_ERR_BADSTRUCTURE,
480 * -FDT_ERR_TRUNCATED, standard meanings.
485 * fdt_path_offset_namelen - find a tree node by its full path
486 * @fdt: pointer to the device tree blob
498 * fdt_path_offset - find a tree node by its full path
499 * @fdt: pointer to the device tree blob
502 * fdt_path_offset() finds a node of a given path in the device tree.
512 * -FDT_ERR_BADPATH, given path does not begin with '/' or is invalid
513 * -FDT_ERR_NOTFOUND, if the requested node does not exist
514 * -FDT_ERR_BADMAGIC,
515 * -FDT_ERR_BADVERSION,
516 * -FDT_ERR_BADSTATE,
517 * -FDT_ERR_BADSTRUCTURE,
518 * -FDT_ERR_TRUNCATED, standard meanings.
523 * fdt_get_name - retrieve the name of a given node
524 * @fdt: pointer to the device tree blob
529 * device tree node at structure block offset nodeoffset. If lenp is
530 * non-NULL, the length of this name is also returned, in the integer
535 * If lenp is non-NULL, *lenp contains the length of that name
538 * if lenp is non-NULL *lenp contains an error code (<0):
539 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE
541 * -FDT_ERR_BADMAGIC,
542 * -FDT_ERR_BADVERSION,
543 * -FDT_ERR_BADSTATE, standard meanings
548 * fdt_first_property_offset - find the offset of a node's first property
549 * @fdt: pointer to the device tree blob
557 * -FDT_ERR_NOTFOUND, if the requested node has no properties
558 * -FDT_ERR_BADOFFSET, if nodeoffset did not point to an FDT_BEGIN_NODE tag
559 * -FDT_ERR_BADMAGIC,
560 * -FDT_ERR_BADVERSION,
561 * -FDT_ERR_BADSTATE,
562 * -FDT_ERR_BADSTRUCTURE,
563 * -FDT_ERR_TRUNCATED, standard meanings.
568 * fdt_next_property_offset - step through a node's properties
569 * @fdt: pointer to the device tree blob
578 * -FDT_ERR_NOTFOUND, if the given property is the last in its node
579 * -FDT_ERR_BADOFFSET, if nodeoffset did not point to an FDT_PROP tag
580 * -FDT_ERR_BADMAGIC,
581 * -FDT_ERR_BADVERSION,
582 * -FDT_ERR_BADSTATE,
583 * -FDT_ERR_BADSTRUCTURE,
584 * -FDT_ERR_TRUNCATED, standard meanings.
589 * fdt_for_each_property_offset - iterate over all properties of a node
602 * if ((property < 0) && (property != -FDT_ERR_NOTFOUND)) {
616 * fdt_get_property_by_offset - retrieve the property at a given offset
617 * @fdt: pointer to the device tree blob
622 * fdt_property structure within the device tree blob at the given
623 * offset. If lenp is non-NULL, the length of the property value is
626 * Note that this code only works on device tree versions >= 16. fdt_getprop()
631 * if lenp is non-NULL, *lenp contains the length of the property
634 * if lenp is non-NULL, *lenp contains an error code (<0):
635 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_PROP tag
636 * -FDT_ERR_BADMAGIC,
637 * -FDT_ERR_BADVERSION,
638 * -FDT_ERR_BADSTATE,
639 * -FDT_ERR_BADSTRUCTURE,
640 * -FDT_ERR_TRUNCATED, standard meanings
647 * fdt_get_property_namelen - find a property based on substring
648 * @fdt: pointer to the device tree blob
665 * fdt_get_property - find a given property in a given node
666 * @fdt: pointer to the device tree blob
672 * structure within the device tree blob corresponding to the property
674 * non-NULL, the length of the property value is also returned, in the
679 * if lenp is non-NULL, *lenp contains the length of the property
682 * if lenp is non-NULL, *lenp contains an error code (<0):
683 * -FDT_ERR_NOTFOUND, node does not have named property
684 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE
686 * -FDT_ERR_BADMAGIC,
687 * -FDT_ERR_BADVERSION,
688 * -FDT_ERR_BADSTATE,
689 * -FDT_ERR_BADSTRUCTURE,
690 * -FDT_ERR_TRUNCATED, standard meanings
703 * fdt_getprop_by_offset - retrieve the value of a property at a given offset
704 * @fdt: pointer to the device tree blob
711 * to within the device blob itself, not a copy of the value). If
712 * lenp is non-NULL, the length of the property value is also
713 * returned, in the integer pointed to by lenp. If namep is non-NULL,
715 * by namep (this will be a pointer to within the device tree's string
720 * if lenp is non-NULL, *lenp contains the length of the property
722 * if namep is non-NULL *namep contiains a pointer to the property
725 * if lenp is non-NULL, *lenp contains an error code (<0):
726 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_PROP tag
727 * -FDT_ERR_BADMAGIC,
728 * -FDT_ERR_BADVERSION,
729 * -FDT_ERR_BADSTATE,
730 * -FDT_ERR_BADSTRUCTURE,
731 * -FDT_ERR_TRUNCATED, standard meanings
739 * fdt_getprop_namelen - get property value based on substring
740 * @fdt: pointer to the device tree blob
762 * fdt_getprop - retrieve the value of a given property
763 * @fdt: pointer to the device tree blob
770 * pointer to within the device blob itself, not a copy of the value).
771 * If lenp is non-NULL, the length of the property value is also
776 * if lenp is non-NULL, *lenp contains the length of the property
779 * if lenp is non-NULL, *lenp contains an error code (<0):
780 * -FDT_ERR_NOTFOUND, node does not have named property
781 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE
783 * -FDT_ERR_BADMAGIC,
784 * -FDT_ERR_BADVERSION,
785 * -FDT_ERR_BADSTATE,
786 * -FDT_ERR_BADSTRUCTURE,
787 * -FDT_ERR_TRUNCATED, standard meanings
798 * fdt_get_phandle - retrieve the phandle of a given node
799 * @fdt: pointer to the device tree blob
802 * fdt_get_phandle() retrieves the phandle of the device tree node at
806 * the phandle of the node at nodeoffset, on success (!= 0, != -1)
812 * fdt_get_alias_namelen - get alias based on substring
813 * @fdt: pointer to the device tree blob
826 * fdt_get_alias - retrieve the path referenced by a given alias
827 * @fdt: pointer to the device tree blob
840 * fdt_get_path - determine the full path of a node
841 * @fdt: pointer to the device tree blob
849 * NOTE: This function is expensive, as it must scan the device tree
855 * nodeoffset, as a NUL-terminated string.
856 * -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag
857 * -FDT_ERR_NOSPACE, the path of the given node is longer than (bufsize-1)
859 * -FDT_ERR_BADMAGIC,
860 * -FDT_ERR_BADVERSION,
861 * -FDT_ERR_BADSTATE,
862 * -FDT_ERR_BADSTRUCTURE, standard meanings
867 * fdt_supernode_atdepth_offset - find a specific ancestor of a node
868 * @fdt: pointer to the device tree blob
882 * NOTE: This function is expensive, as it must scan the device tree
888 * -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag
889 * -FDT_ERR_NOTFOUND, supernodedepth was greater than the depth of
891 * -FDT_ERR_BADMAGIC,
892 * -FDT_ERR_BADVERSION,
893 * -FDT_ERR_BADSTATE,
894 * -FDT_ERR_BADSTRUCTURE, standard meanings
900 * fdt_node_depth - find the depth of a given node
901 * @fdt: pointer to the device tree blob
907 * NOTE: This function is expensive, as it must scan the device tree
912 * -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag
913 * -FDT_ERR_BADMAGIC,
914 * -FDT_ERR_BADVERSION,
915 * -FDT_ERR_BADSTATE,
916 * -FDT_ERR_BADSTRUCTURE, standard meanings
921 * fdt_parent_offset - find the parent of a given node
922 * @fdt: pointer to the device tree blob
929 * NOTE: This function is expensive, as it must scan the device tree
935 * -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag
936 * -FDT_ERR_BADMAGIC,
937 * -FDT_ERR_BADVERSION,
938 * -FDT_ERR_BADSTATE,
939 * -FDT_ERR_BADSTRUCTURE, standard meanings
944 * fdt_node_offset_by_prop_value - find nodes with a given property value
945 * @fdt: pointer to the device tree blob
954 * startoffset is -1, the very first such node in the tree.
958 * offset = fdt_node_offset_by_prop_value(fdt, -1, propname,
960 * while (offset != -FDT_ERR_NOTFOUND) {
966 * Note the -1 in the first call to the function, if 0 is used here
973 * -FDT_ERR_NOTFOUND, no node matching the criterion exists in the
974 * tree after startoffset
975 * -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag
976 * -FDT_ERR_BADMAGIC,
977 * -FDT_ERR_BADVERSION,
978 * -FDT_ERR_BADSTATE,
979 * -FDT_ERR_BADSTRUCTURE, standard meanings
986 * fdt_node_offset_by_phandle - find the node with a given phandle
987 * @fdt: pointer to the device tree blob
992 * in the tree with the given phandle (an invalid tree), results are
997 * -FDT_ERR_NOTFOUND, no node with that phandle exists
998 * -FDT_ERR_BADPHANDLE, given phandle value was invalid (0 or -1)
999 * -FDT_ERR_BADMAGIC,
1000 * -FDT_ERR_BADVERSION,
1001 * -FDT_ERR_BADSTATE,
1002 * -FDT_ERR_BADSTRUCTURE, standard meanings
1008 * @fdt: pointer to the device tree blob
1009 * @nodeoffset: offset of a tree node
1015 * it returns non-zero otherwise, or on error.
1021 * -FDT_ERR_NOTFOUND, if the given node has no 'compatible' property
1022 * -FDT_ERR_BADOFFSET, if nodeoffset does not refer to a BEGIN_NODE tag
1023 * -FDT_ERR_BADMAGIC,
1024 * -FDT_ERR_BADVERSION,
1025 * -FDT_ERR_BADSTATE,
1026 * -FDT_ERR_BADSTRUCTURE, standard meanings
1032 * fdt_node_offset_by_compatible - find nodes with a given 'compatible' value
1033 * @fdt: pointer to the device tree blob
1039 * lists the given compatible string; or if startoffset is -1, the
1040 * very first such node in the tree.
1044 * offset = fdt_node_offset_by_compatible(fdt, -1, compatible);
1045 * while (offset != -FDT_ERR_NOTFOUND) {
1050 * Note the -1 in the first call to the function, if 0 is used here
1057 * -FDT_ERR_NOTFOUND, no node matching the criterion exists in the
1058 * tree after startoffset
1059 * -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag
1060 * -FDT_ERR_BADMAGIC,
1061 * -FDT_ERR_BADVERSION,
1062 * -FDT_ERR_BADSTATE,
1063 * -FDT_ERR_BADSTRUCTURE, standard meanings
1069 * fdt_stringlist_contains - check a string list property for a string
1075 * one or more strings, each terminated by \0, as is found in a device tree
1083 * fdt_stringlist_count - count the number of strings in a string list
1084 * @fdt: pointer to the device tree blob
1085 * @nodeoffset: offset of a tree node
1089 * -FDT_ERR_BADVALUE if the property value is not NUL-terminated
1090 * -FDT_ERR_NOTFOUND if the property does not exist
1095 * fdt_stringlist_search - find a string in a string list and return its index
1096 * @fdt: pointer to the device tree blob
1097 * @nodeoffset: offset of a tree node
1102 * that are not NUL-terminated. That's because the function will stop after
1104 * small-valued cell properties, such as #address-cells, when searching for
1109 * -FDT_ERR_BADVALUE if the property value is not NUL-terminated
1110 * -FDT_ERR_NOTFOUND if the property does not exist or does not contain
1117 * fdt_stringlist_get() - obtain the string at a given index in a string list
1118 * @fdt: pointer to the device tree blob
1119 * @nodeoffset: offset of a tree node
1125 * non-NUL-terminated values. For example on small-valued cell properties
1128 * If non-NULL, the length of the string (on success) or a negative error-code
1134 * location pointed to by the lenp parameter, if non-NULL. On failure one of
1136 * (if non-NULL):
1137 * -FDT_ERR_BADVALUE if the property value is not NUL-terminated
1138 * -FDT_ERR_NOTFOUND if the property does not exist
1145 /* Read-only functions (addressing related) */
1149 * FDT_MAX_NCELLS - maximum value for #address-cells and #size-cells
1151 * This is the maximum value for #address-cells, #size-cells and
1160 * fdt_address_cells - retrieve address size for a bus represented in the tree
1161 * @fdt: pointer to the device tree blob
1164 * When the node has a valid #address-cells property, returns its value.
1168 * 2, if the node has no #address-cells property
1169 * -FDT_ERR_BADNCELLS, if the node has a badly formatted or invalid
1170 * #address-cells property
1171 * -FDT_ERR_BADMAGIC,
1172 * -FDT_ERR_BADVERSION,
1173 * -FDT_ERR_BADSTATE,
1174 * -FDT_ERR_BADSTRUCTURE,
1175 * -FDT_ERR_TRUNCATED, standard meanings
1180 * fdt_size_cells - retrieve address range size for a bus represented in the
1181 * tree
1182 * @fdt: pointer to the device tree blob
1185 * When the node has a valid #size-cells property, returns its value.
1189 * 1, if the node has no #size-cells property
1190 * -FDT_ERR_BADNCELLS, if the node has a badly formatted or invalid
1191 * #size-cells property
1192 * -FDT_ERR_BADMAGIC,
1193 * -FDT_ERR_BADVERSION,
1194 * -FDT_ERR_BADSTATE,
1195 * -FDT_ERR_BADSTRUCTURE,
1196 * -FDT_ERR_TRUNCATED, standard meanings
1202 /* Write-in-place functions */
1206 * fdt_setprop_inplace_namelen_partial - change a property's value,
1208 * @fdt: pointer to the device tree blob
1229 * fdt_setprop_inplace - change a property's value, but not its size
1230 * @fdt: pointer to the device tree blob
1243 * of the tree.
1247 * -FDT_ERR_NOSPACE, if len is not equal to the property's current length
1248 * -FDT_ERR_NOTFOUND, node does not have the named property
1249 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1250 * -FDT_ERR_BADMAGIC,
1251 * -FDT_ERR_BADVERSION,
1252 * -FDT_ERR_BADSTATE,
1253 * -FDT_ERR_BADSTRUCTURE,
1254 * -FDT_ERR_TRUNCATED, standard meanings
1262 * fdt_setprop_inplace_u32 - change the value of a 32-bit integer property
1263 * @fdt: pointer to the device tree blob
1266 * @val: 32-bit integer value to replace the property with
1269 * with the 32-bit integer value in val, converting val to big-endian
1276 * of the tree.
1280 * -FDT_ERR_NOSPACE, if the property's length is not equal to 4
1281 * -FDT_ERR_NOTFOUND, node does not have the named property
1282 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1283 * -FDT_ERR_BADMAGIC,
1284 * -FDT_ERR_BADVERSION,
1285 * -FDT_ERR_BADSTATE,
1286 * -FDT_ERR_BADSTRUCTURE,
1287 * -FDT_ERR_TRUNCATED, standard meanings
1297 * fdt_setprop_inplace_u64 - change the value of a 64-bit integer property
1298 * @fdt: pointer to the device tree blob
1301 * @val: 64-bit integer value to replace the property with
1304 * with the 64-bit integer value in val, converting val to big-endian
1311 * of the tree.
1315 * -FDT_ERR_NOSPACE, if the property's length is not equal to 8
1316 * -FDT_ERR_NOTFOUND, node does not have the named property
1317 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1318 * -FDT_ERR_BADMAGIC,
1319 * -FDT_ERR_BADVERSION,
1320 * -FDT_ERR_BADSTATE,
1321 * -FDT_ERR_BADSTRUCTURE,
1322 * -FDT_ERR_TRUNCATED, standard meanings
1332 * fdt_setprop_inplace_cell - change the value of a single-cell property
1343 * fdt_nop_property - replace a property with nop tags
1344 * @fdt: pointer to the device tree blob
1350 * tree.
1354 * tree.
1358 * -FDT_ERR_NOTFOUND, node does not have the named property
1359 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1360 * -FDT_ERR_BADMAGIC,
1361 * -FDT_ERR_BADVERSION,
1362 * -FDT_ERR_BADSTATE,
1363 * -FDT_ERR_BADSTRUCTURE,
1364 * -FDT_ERR_TRUNCATED, standard meanings
1369 * fdt_nop_node - replace a node (subtree) with nop tags
1370 * @fdt: pointer to the device tree blob
1375 * effectively removing it from the tree.
1379 * move any other part of the tree.
1383 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1384 * -FDT_ERR_BADMAGIC,
1385 * -FDT_ERR_BADVERSION,
1386 * -FDT_ERR_BADSTATE,
1387 * -FDT_ERR_BADSTRUCTURE,
1388 * -FDT_ERR_TRUNCATED, standard meanings
1398 /* FDT_CREATE_FLAG_NO_NAME_DEDUP: Do not try to de-duplicate property
1405 * fdt_create_with_flags - begin creation of a new fdt
1417 * -FDT_ERR_NOSPACE, bufsize is insufficient for a minimal fdt
1418 * -FDT_ERR_BADFLAGS, flags is not valid
1423 * fdt_create - begin creation of a new fdt
1431 * -FDT_ERR_NOSPACE, bufsize is insufficient for a minimal fdt
1459 * fdt_property_placeholder - add a new property and return a ptr to its value
1461 * @fdt: pointer to the device tree blob
1468 * -FDT_ERR_BADMAGIC,
1469 * -FDT_ERR_NOSPACE, standard meanings
1479 /* Read-write functions */
1487 * fdt_add_mem_rsv - add one memory reserve map entry
1488 * @fdt: pointer to the device tree blob
1489 * @address, @size: 64-bit values (native endian)
1499 * -FDT_ERR_NOSPACE, there is insufficient free space in the blob to
1501 * -FDT_ERR_BADMAGIC,
1502 * -FDT_ERR_BADVERSION,
1503 * -FDT_ERR_BADSTATE,
1504 * -FDT_ERR_BADSTRUCTURE,
1505 * -FDT_ERR_BADLAYOUT,
1506 * -FDT_ERR_TRUNCATED, standard meanings
1511 * fdt_del_mem_rsv - remove a memory reserve map entry
1512 * @fdt: pointer to the device tree blob
1515 * fdt_del_mem_rsv() removes the n-th memory reserve map entry from
1523 * -FDT_ERR_NOTFOUND, there is no entry of the given index (i.e. there
1525 * -FDT_ERR_BADMAGIC,
1526 * -FDT_ERR_BADVERSION,
1527 * -FDT_ERR_BADSTATE,
1528 * -FDT_ERR_BADSTRUCTURE,
1529 * -FDT_ERR_BADLAYOUT,
1530 * -FDT_ERR_TRUNCATED, standard meanings
1535 * fdt_set_name - change the name of a given node
1536 * @fdt: pointer to the device tree blob
1551 * -FDT_ERR_NOSPACE, there is insufficient free space in the blob
1553 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1554 * -FDT_ERR_BADMAGIC,
1555 * -FDT_ERR_BADVERSION,
1556 * -FDT_ERR_BADSTATE, standard meanings
1561 * fdt_setprop - create or change a property
1562 * @fdt: pointer to the device tree blob
1577 * -FDT_ERR_NOSPACE, there is insufficient free space in the blob to
1579 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1580 * -FDT_ERR_BADLAYOUT,
1581 * -FDT_ERR_BADMAGIC,
1582 * -FDT_ERR_BADVERSION,
1583 * -FDT_ERR_BADSTATE,
1584 * -FDT_ERR_BADSTRUCTURE,
1585 * -FDT_ERR_BADLAYOUT,
1586 * -FDT_ERR_TRUNCATED, standard meanings
1592 * fdt_setprop_placeholder - allocate space for a property
1593 * @fdt: pointer to the device tree blob
1608 * -FDT_ERR_NOSPACE, there is insufficient free space in the blob to
1610 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1611 * -FDT_ERR_BADLAYOUT,
1612 * -FDT_ERR_BADMAGIC,
1613 * -FDT_ERR_BADVERSION,
1614 * -FDT_ERR_BADSTATE,
1615 * -FDT_ERR_BADSTRUCTURE,
1616 * -FDT_ERR_BADLAYOUT,
1617 * -FDT_ERR_TRUNCATED, standard meanings
1623 * fdt_setprop_u32 - set a property to a 32-bit integer
1624 * @fdt: pointer to the device tree blob
1627 * @val: 32-bit integer value for the property (native endian)
1630 * node to the given 32-bit integer value (converting to big-endian if
1639 * -FDT_ERR_NOSPACE, there is insufficient free space in the blob to
1641 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1642 * -FDT_ERR_BADLAYOUT,
1643 * -FDT_ERR_BADMAGIC,
1644 * -FDT_ERR_BADVERSION,
1645 * -FDT_ERR_BADSTATE,
1646 * -FDT_ERR_BADSTRUCTURE,
1647 * -FDT_ERR_BADLAYOUT,
1648 * -FDT_ERR_TRUNCATED, standard meanings
1658 * fdt_setprop_u64 - set a property to a 64-bit integer
1659 * @fdt: pointer to the device tree blob
1662 * @val: 64-bit integer value for the property (native endian)
1665 * node to the given 64-bit integer value (converting to big-endian if
1674 * -FDT_ERR_NOSPACE, there is insufficient free space in the blob to
1676 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1677 * -FDT_ERR_BADLAYOUT,
1678 * -FDT_ERR_BADMAGIC,
1679 * -FDT_ERR_BADVERSION,
1680 * -FDT_ERR_BADSTATE,
1681 * -FDT_ERR_BADSTRUCTURE,
1682 * -FDT_ERR_BADLAYOUT,
1683 * -FDT_ERR_TRUNCATED, standard meanings
1693 * fdt_setprop_cell - set a property to a single cell value
1704 * fdt_setprop_string - set a property to a string value
1705 * @fdt: pointer to the device tree blob
1720 * -FDT_ERR_NOSPACE, there is insufficient free space in the blob to
1722 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1723 * -FDT_ERR_BADLAYOUT,
1724 * -FDT_ERR_BADMAGIC,
1725 * -FDT_ERR_BADVERSION,
1726 * -FDT_ERR_BADSTATE,
1727 * -FDT_ERR_BADSTRUCTURE,
1728 * -FDT_ERR_BADLAYOUT,
1729 * -FDT_ERR_TRUNCATED, standard meanings
1736 * fdt_setprop_empty - set a property to an empty value
1737 * @fdt: pointer to the device tree blob
1750 * -FDT_ERR_NOSPACE, there is insufficient free space in the blob to
1752 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1753 * -FDT_ERR_BADLAYOUT,
1754 * -FDT_ERR_BADMAGIC,
1755 * -FDT_ERR_BADVERSION,
1756 * -FDT_ERR_BADSTATE,
1757 * -FDT_ERR_BADSTRUCTURE,
1758 * -FDT_ERR_BADLAYOUT,
1759 * -FDT_ERR_TRUNCATED, standard meanings
1765 * fdt_appendprop - append to or create a property
1766 * @fdt: pointer to the device tree blob
1780 * -FDT_ERR_NOSPACE, there is insufficient free space in the blob to
1782 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1783 * -FDT_ERR_BADLAYOUT,
1784 * -FDT_ERR_BADMAGIC,
1785 * -FDT_ERR_BADVERSION,
1786 * -FDT_ERR_BADSTATE,
1787 * -FDT_ERR_BADSTRUCTURE,
1788 * -FDT_ERR_BADLAYOUT,
1789 * -FDT_ERR_TRUNCATED, standard meanings
1795 * fdt_appendprop_u32 - append a 32-bit integer value to a property
1796 * @fdt: pointer to the device tree blob
1799 * @val: 32-bit integer value to append to the property (native endian)
1801 * fdt_appendprop_u32() appends the given 32-bit integer value
1802 * (converting to big-endian if necessary) to the value of the named
1811 * -FDT_ERR_NOSPACE, there is insufficient free space in the blob to
1813 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1814 * -FDT_ERR_BADLAYOUT,
1815 * -FDT_ERR_BADMAGIC,
1816 * -FDT_ERR_BADVERSION,
1817 * -FDT_ERR_BADSTATE,
1818 * -FDT_ERR_BADSTRUCTURE,
1819 * -FDT_ERR_BADLAYOUT,
1820 * -FDT_ERR_TRUNCATED, standard meanings
1830 * fdt_appendprop_u64 - append a 64-bit integer value to a property
1831 * @fdt: pointer to the device tree blob
1834 * @val: 64-bit integer value to append to the property (native endian)
1836 * fdt_appendprop_u64() appends the given 64-bit integer value
1837 * (converting to big-endian if necessary) to the value of the named
1846 * -FDT_ERR_NOSPACE, there is insufficient free space in the blob to
1848 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1849 * -FDT_ERR_BADLAYOUT,
1850 * -FDT_ERR_BADMAGIC,
1851 * -FDT_ERR_BADVERSION,
1852 * -FDT_ERR_BADSTATE,
1853 * -FDT_ERR_BADSTRUCTURE,
1854 * -FDT_ERR_BADLAYOUT,
1855 * -FDT_ERR_TRUNCATED, standard meanings
1865 * fdt_appendprop_cell - append a single cell value to a property
1876 * fdt_appendprop_string - append a string to a property
1877 * @fdt: pointer to the device tree blob
1891 * -FDT_ERR_NOSPACE, there is insufficient free space in the blob to
1893 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1894 * -FDT_ERR_BADLAYOUT,
1895 * -FDT_ERR_BADMAGIC,
1896 * -FDT_ERR_BADVERSION,
1897 * -FDT_ERR_BADSTATE,
1898 * -FDT_ERR_BADSTRUCTURE,
1899 * -FDT_ERR_BADLAYOUT,
1900 * -FDT_ERR_TRUNCATED, standard meanings
1906 * fdt_appendprop_addrrange - append a address range property
1907 * @fdt: pointer to the device tree blob
1919 * Cell sizes are determined by parent's #address-cells and #size-cells.
1926 * -FDT_ERR_BADLAYOUT,
1927 * -FDT_ERR_BADMAGIC,
1928 * -FDT_ERR_BADNCELLS, if the node has a badly formatted or invalid
1929 * #address-cells property
1930 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1931 * -FDT_ERR_BADSTATE,
1932 * -FDT_ERR_BADSTRUCTURE,
1933 * -FDT_ERR_BADVERSION,
1934 * -FDT_ERR_BADVALUE, addr or size doesn't fit to respective cells size
1935 * -FDT_ERR_NOSPACE, there is insufficient free space in the blob to
1937 * -FDT_ERR_TRUNCATED, standard meanings
1943 * fdt_delprop - delete a property
1944 * @fdt: pointer to the device tree blob
1955 * -FDT_ERR_NOTFOUND, node does not have the named property
1956 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1957 * -FDT_ERR_BADLAYOUT,
1958 * -FDT_ERR_BADMAGIC,
1959 * -FDT_ERR_BADVERSION,
1960 * -FDT_ERR_BADSTATE,
1961 * -FDT_ERR_BADSTRUCTURE,
1962 * -FDT_ERR_TRUNCATED, standard meanings
1967 * fdt_add_subnode_namelen - creates a new node based on substring
1968 * @fdt: pointer to the device tree blob
1984 * fdt_add_subnode - creates a new node
1985 * @fdt: pointer to the device tree blob
1999 * -FDT_ERR_NOTFOUND, if the requested subnode does not exist
2000 * -FDT_ERR_BADOFFSET, if parentoffset did not point to an FDT_BEGIN_NODE
2002 * -FDT_ERR_EXISTS, if the node at parentoffset already has a subnode of
2004 * -FDT_ERR_NOSPACE, if there is insufficient free space in the
2006 * -FDT_ERR_NOSPACE
2007 * -FDT_ERR_BADLAYOUT
2008 * -FDT_ERR_BADMAGIC,
2009 * -FDT_ERR_BADVERSION,
2010 * -FDT_ERR_BADSTATE,
2011 * -FDT_ERR_BADSTRUCTURE,
2012 * -FDT_ERR_TRUNCATED, standard meanings.
2017 * fdt_del_node - delete a node (subtree)
2018 * @fdt: pointer to the device tree blob
2029 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
2030 * -FDT_ERR_BADLAYOUT,
2031 * -FDT_ERR_BADMAGIC,
2032 * -FDT_ERR_BADVERSION,
2033 * -FDT_ERR_BADSTATE,
2034 * -FDT_ERR_BADSTRUCTURE,
2035 * -FDT_ERR_TRUNCATED, standard meanings
2040 * fdt_overlay_apply - Applies a DT overlay on a base DT
2041 * @fdt: pointer to the base device tree blob
2042 * @fdto: pointer to the device tree overlay blob
2044 * fdt_overlay_apply() will apply the given device tree overlay on the
2045 * given base device tree.
2047 * Expect the base device tree to be modified, even if the function
2052 * -FDT_ERR_NOSPACE, there's not enough space in the base device tree
2053 * -FDT_ERR_NOTFOUND, the overlay points to some inexistant nodes or
2055 * -FDT_ERR_BADPHANDLE,
2056 * -FDT_ERR_BADOVERLAY,
2057 * -FDT_ERR_NOPHANDLES,
2058 * -FDT_ERR_INTERNAL,
2059 * -FDT_ERR_BADLAYOUT,
2060 * -FDT_ERR_BADMAGIC,
2061 * -FDT_ERR_BADOFFSET,
2062 * -FDT_ERR_BADPATH,
2063 * -FDT_ERR_BADVERSION,
2064 * -FDT_ERR_BADSTRUCTURE,
2065 * -FDT_ERR_BADSTATE,
2066 * -FDT_ERR_TRUNCATED, standard meanings