* Find a node from a device tree path, relative to a parent node. * * @param parent The node from which to start the relative path lookup. * @param path An array of path component strings that will be looked * up in order to find the node. Must be terminated with * a NULL pointer. Example: {'firmware', 'coreboot', NULL} * @param addrcp Pointer that will be updated with any #address-cell
| 1112 | * @return The found/created node, or NULL. |
| 1113 | */ |
| 1114 | struct device_tree_node *dt_find_node(struct device_tree_node *parent, |
| 1115 | const char *const *path, u32 *addrcp, |
| 1116 | u32 *sizecp, int create) |
| 1117 | { |
| 1118 | /* Initialize cells to default values according to FDT spec. */ |
| 1119 | if (addrcp) |
| 1120 | *addrcp = 2; |
| 1121 | |
| 1122 | if (sizecp) |
| 1123 | *sizecp = 1; |
| 1124 | |
| 1125 | return _dt_find_node(parent, path, addrcp, sizecp, create); |
| 1126 | } |
| 1127 | |
| 1128 | /* |
| 1129 | * Find a node in the tree from a string device tree path. |