unflatten_dt_nodes — Create expanded device tree (EDT)
int unflatten_dt_nodes ( | const void * blob, |
void * mem, | |
struct device_node * dad, | |
struct device_node ** nodepp) ; |
blob
Pointer to flattened device tree (FDT)
mem
NULL or pointer to memory chunk for memory allocations
dad
NULL or pointer to device tree node to attach new tree to
nodepp
Pointer used to return the root of the EDT
If mem
is NULL calculates required size of mem
for a subsequent call to
unflatten_dt_nodes
.
If mem
is not NULL create an expanded device tree (EDT) from the flattened
device tree (FDT) blob
. Any memory allocations to create the EDT will use
memory from mem
. The “name” and “type” fields of the nodes will be
populated so the normal device-tree walking functions can be used.
If dad
is NULL, the path of the root of the EDT will “/”.
If dad
is not NULL that is probably an error. This usage is deprecated.
The newly created tree will be grafted onto node dad
.
If dad
is not NULL and the FDT version is 0x10 or later the fullname of the
root of the EDT will be the fullname of dad
+ “/” + the name of the first
node in blob
. This is most likely not what you want, because the name of
the first node in blob
is "". The fullname of children of the root of the
EDT will include the fullname of the root node of the EDT, and thus the
fullname of dad
.
If dad
is not NULL and the FDT version is before 0x10 the fullname of the
root of the EDT will be the name of the first node in blob
. The fullname
of children of the root of the EDT will not include the fullname of dad
.