Lines Matching +full:child +full:- +full:node

1 // SPDX-License-Identifier: GPL-2.0+
6 * Copyright (C) 1996-2005 Paul Mackerras.
53 /* use when traversing tree through the child, sibling,
66 node_name = kbasename(np->full_name); in of_node_name_eq()
67 len = strchrnul(node_name, '@') - node_name; in of_node_name_eq()
78 return strncmp(kbasename(np->full_name), prefix, strlen(prefix)) == 0; in of_node_name_prefix()
93 for (; np; np = np->parent) in of_bus_n_addr_cells()
94 if (!of_property_read_u32(np, "#address-cells", &cells)) in of_bus_n_addr_cells()
97 /* No #address-cells property for the root node */ in of_bus_n_addr_cells()
103 if (np->parent) in of_n_addr_cells()
104 np = np->parent; in of_n_addr_cells()
114 for (; np; np = np->parent) in of_bus_n_size_cells()
115 if (!of_property_read_u32(np, "#size-cells", &cells)) in of_bus_n_size_cells()
118 /* No #size-cells property for the root node */ in of_bus_n_size_cells()
124 if (np->parent) in of_n_size_cells()
125 np = np->parent; in of_n_size_cells()
162 if (np && handle == np->phandle) in __of_phandle_cache_inv_entry()
182 if (np->phandle && !phandle_cache[of_phandle_cache_hash(np->phandle)]) in of_core_init()
183 phandle_cache[of_phandle_cache_hash(np->phandle)] = np; in of_core_init()
189 proc_symlink("device-tree", NULL, "/sys/firmware/devicetree/base"); in of_core_init()
200 for (pp = np->properties; pp; pp = pp->next) { in __of_find_property()
201 if (of_prop_cmp(pp->name, name) == 0) { in __of_find_property()
203 *lenp = pp->length; in __of_find_property()
231 } else if (prev->child) { in __of_find_all_nodes()
232 np = prev->child; in __of_find_all_nodes()
236 while (np->parent && !np->sibling) in __of_find_all_nodes()
237 np = np->parent; in __of_find_all_nodes()
238 np = np->sibling; /* Might be null at the end of the tree */ in __of_find_all_nodes()
244 * of_find_all_nodes - Get next node in global list
245 * @prev: Previous node or NULL to start iteration
248 * Return: A node pointer with refcount incremented, use
266 * Find a property with a given name for a given node
274 return pp ? pp->value : NULL; in __of_get_property()
278 * Find a property with a given name for a given node
286 return pp ? pp->value : NULL; in of_get_property()
291 * __of_device_is_compatible() - Check if the node matches given constraints
292 * @device: pointer to node
295 * @name: required node name, NULL or "" for any match
333 score = INT_MAX/2 - (index << 2); in __of_device_is_compatible()
398 * of_machine_is_compatible - Test root of device tree for a given compatible value
399 * @compat: compatible string to look for in root node's compatible property.
401 * Return: A positive integer if the root node has the given value in its
419 * __of_device_is_available - check if a device is available for use
421 * @device: Node to check for availability, with locks already held
447 * of_device_is_available - check if a device is available for use
449 * @device: Node to check for availability
468 * __of_device_is_fail - check if a device has status "fail" or "fail-..."
470 * @device: Node to check status for, with locks already held
472 * Return: True if the status property is set to "fail" or "fail-..." (for any
486 return !strcmp(status, "fail") || !strncmp(status, "fail-", 5); in __of_device_is_fail()
490 * of_device_is_big_endian - check if a device has BE registers
492 * @device: Node to check for endianness
494 * Return: True if the device has a "big-endian" property, or if the kernel
495 * was compiled for BE *and* the device has a "native-endian" property.
503 if (of_property_read_bool(device, "big-endian")) in of_device_is_big_endian()
506 of_property_read_bool(device, "native-endian")) in of_device_is_big_endian()
513 * of_get_parent - Get a node's parent if any
514 * @node: Node to get parent
516 * Return: A node pointer with refcount incremented, use
519 struct device_node *of_get_parent(const struct device_node *node) in of_get_parent() argument
524 if (!node) in of_get_parent()
528 np = of_node_get(node->parent); in of_get_parent()
535 * of_get_next_parent - Iterate to a node's parent
536 * @node: Node to get parent of
539 * refcount on the passed node, making it suitable for iterating
540 * through a node's parents.
542 * Return: A node pointer with refcount incremented, use
545 struct device_node *of_get_next_parent(struct device_node *node) in of_get_next_parent() argument
550 if (!node) in of_get_next_parent()
554 parent = of_node_get(node->parent); in of_get_next_parent()
555 of_node_put(node); in of_get_next_parent()
561 static struct device_node *__of_get_next_child(const struct device_node *node, in __of_get_next_child() argument
566 if (!node) in __of_get_next_child()
569 next = prev ? prev->sibling : node->child; in __of_get_next_child()
574 #define __for_each_child_of_node(parent, child) \ argument
575 for (child = __of_get_next_child(parent, NULL); child != NULL; \
576 child = __of_get_next_child(parent, child))
579 * of_get_next_child - Iterate a node childs
580 * @node: parent node
581 * @prev: previous child of the parent node, or NULL to get first
583 * Return: A node pointer with refcount incremented, use of_node_put() on
584 * it when done. Returns NULL when prev is the last child. Decrements the
587 struct device_node *of_get_next_child(const struct device_node *node, in of_get_next_child() argument
594 next = __of_get_next_child(node, prev); in of_get_next_child()
601 * of_get_next_available_child - Find the next available child node
602 * @node: parent node
603 * @prev: previous child of the parent node, or NULL to get first
608 struct device_node *of_get_next_available_child(const struct device_node *node, in of_get_next_available_child() argument
614 if (!node) in of_get_next_available_child()
618 next = prev ? prev->sibling : node->child; in of_get_next_available_child()
619 for (; next; next = next->sibling) { in of_get_next_available_child()
632 * of_get_next_cpu_node - Iterate on cpu nodes
633 * @prev: previous child of the /cpus node, or NULL to get first
635 * Unusable CPUs (those with the status property set to "fail" or "fail-...")
638 * Return: A cpu node pointer with refcount incremented, use of_node_put()
639 * on it when done. Returns NULL when prev is the last child. Decrements
646 struct device_node *node; in of_get_next_cpu_node() local
649 node = of_find_node_by_path("/cpus"); in of_get_next_cpu_node()
653 next = prev->sibling; in of_get_next_cpu_node()
654 else if (node) { in of_get_next_cpu_node()
655 next = node->child; in of_get_next_cpu_node()
656 of_node_put(node); in of_get_next_cpu_node()
658 for (; next; next = next->sibling) { in of_get_next_cpu_node()
674 * of_get_compatible_child - Find compatible child node
675 * @parent: parent node
678 * Lookup child node whose compatible property contains the given compatible
681 * Return: a node pointer with refcount incremented, use of_node_put() on it
687 struct device_node *child; in of_get_compatible_child() local
689 for_each_child_of_node(parent, child) { in of_get_compatible_child()
690 if (of_device_is_compatible(child, compatible)) in of_get_compatible_child()
694 return child; in of_get_compatible_child()
699 * of_get_child_by_name - Find the child node by name for a given parent
700 * @node: parent node
701 * @name: child name to look for.
703 * This function looks for child node for given matching name
705 * Return: A node pointer if found, with refcount incremented, use
707 * Returns NULL if node is not found.
709 struct device_node *of_get_child_by_name(const struct device_node *node, in of_get_child_by_name() argument
712 struct device_node *child; in of_get_child_by_name() local
714 for_each_child_of_node(node, child) in of_get_child_by_name()
715 if (of_node_name_eq(child, name)) in of_get_child_by_name()
717 return child; in of_get_child_by_name()
724 struct device_node *child; in __of_find_node_by_path() local
731 __for_each_child_of_node(parent, child) { in __of_find_node_by_path()
732 const char *name = kbasename(child->full_name); in __of_find_node_by_path()
734 return child; in __of_find_node_by_path()
739 struct device_node *__of_find_node_by_full_path(struct device_node *node, in __of_find_node_by_full_path() argument
744 while (node && *path == '/') { in __of_find_node_by_full_path()
745 struct device_node *tmp = node; in __of_find_node_by_full_path()
748 node = __of_find_node_by_path(node, path); in __of_find_node_by_full_path()
754 return node; in __of_find_node_by_full_path()
758 * of_find_node_opts_by_path - Find a node matching a full OF path
761 * node (an alias). In the case of an alias, the node
772 * Return: A node pointer with refcount incremented, use
795 len = p - path; in of_find_node_opts_by_path()
802 if (strlen(pp->name) == len && !strncmp(pp->name, path, len)) { in of_find_node_opts_by_path()
803 np = of_find_node_by_path(pp->value); in of_find_node_opts_by_path()
823 * of_find_node_by_name - Find a node by its "name" property
824 * @from: The node to start searching from or NULL; the node
830 * Return: A node pointer with refcount incremented, use
850 * of_find_node_by_type - Find a node by its "device_type" property
851 * @from: The node to start searching from, or NULL to start searching
852 * the entire device tree. The node you pass will not be
858 * Return: A node pointer with refcount incremented, use
878 * of_find_compatible_node - Find a node based on type and one of the
880 * @from: The node to start searching from or NULL, the node
888 * Return: A node pointer with refcount incremented, use
909 * of_find_node_with_property - Find a node which has a property with
911 * @from: The node to start searching from or NULL, the node
917 * Return: A node pointer with refcount incremented, use
929 for (pp = np->properties; pp; pp = pp->next) { in of_find_node_with_property()
930 if (of_prop_cmp(pp->name, prop_name) == 0) { in of_find_node_with_property()
945 const struct device_node *node) in __of_match_node() argument
953 for (; matches->name[0] || matches->type[0] || matches->compatible[0]; matches++) { in __of_match_node()
954 score = __of_device_is_compatible(node, matches->compatible, in __of_match_node()
955 matches->type, matches->name); in __of_match_node()
966 * of_match_node - Tell if a device_node has a matching of_match structure
968 * @node: the of device structure to match against
973 const struct device_node *node) in of_match_node() argument
979 match = __of_match_node(matches, node); in of_match_node()
986 * of_find_matching_node_and_match - Find a node based on an of_device_id
988 * @from: The node to start searching from or NULL, the node
995 * Return: A node pointer with refcount incremented, use
1025 * of_alias_from_compatible - Lookup appropriate alias for a device node
1027 * @node: pointer to a device tree node
1032 * to choose an appropriate alias value for a particular device tree node.
1041 int of_alias_from_compatible(const struct device_node *node, char *alias, int len) in of_alias_from_compatible() argument
1046 compatible = of_get_property(node, "compatible", &cplen); in of_alias_from_compatible()
1048 return -ENODEV; in of_alias_from_compatible()
1056 * of_find_node_by_phandle - Find a node given a phandle
1057 * @handle: phandle of the node to find
1059 * Return: A node pointer with refcount incremented, use
1076 handle == phandle_cache[handle_hash]->phandle) in of_find_node_by_phandle()
1081 if (np->phandle == handle && in of_find_node_by_phandle()
1097 printk("%s %pOF", msg, args->np); in of_print_phandle_args()
1098 for (i = 0; i < args->args_count; i++) { in of_print_phandle_args()
1101 pr_cont("%c%08x", delim, args->args[i]); in of_print_phandle_args()
1122 return -EINVAL; in of_phandle_iterator_init()
1126 return -ENOENT; in of_phandle_iterator_init()
1128 it->cells_name = cells_name; in of_phandle_iterator_init()
1129 it->cell_count = cell_count; in of_phandle_iterator_init()
1130 it->parent = np; in of_phandle_iterator_init()
1131 it->list_end = list + size / sizeof(*list); in of_phandle_iterator_init()
1132 it->phandle_end = list; in of_phandle_iterator_init()
1133 it->cur = list; in of_phandle_iterator_init()
1143 if (it->node) { in of_phandle_iterator_next()
1144 of_node_put(it->node); in of_phandle_iterator_next()
1145 it->node = NULL; in of_phandle_iterator_next()
1148 if (!it->cur || it->phandle_end >= it->list_end) in of_phandle_iterator_next()
1149 return -ENOENT; in of_phandle_iterator_next()
1151 it->cur = it->phandle_end; in of_phandle_iterator_next()
1154 it->phandle = be32_to_cpup(it->cur++); in of_phandle_iterator_next()
1156 if (it->phandle) { in of_phandle_iterator_next()
1159 * Find the provider node and parse the #*-cells property to in of_phandle_iterator_next()
1162 it->node = of_find_node_by_phandle(it->phandle); in of_phandle_iterator_next()
1164 if (it->cells_name) { in of_phandle_iterator_next()
1165 if (!it->node) { in of_phandle_iterator_next()
1167 it->parent, it->phandle); in of_phandle_iterator_next()
1171 if (of_property_read_u32(it->node, it->cells_name, in of_phandle_iterator_next()
1178 if (it->cell_count >= 0) { in of_phandle_iterator_next()
1179 count = it->cell_count; in of_phandle_iterator_next()
1182 it->parent, in of_phandle_iterator_next()
1183 it->cells_name, in of_phandle_iterator_next()
1184 it->node); in of_phandle_iterator_next()
1189 count = it->cell_count; in of_phandle_iterator_next()
1196 if (it->cur + count > it->list_end) { in of_phandle_iterator_next()
1197 if (it->cells_name) in of_phandle_iterator_next()
1199 it->parent, it->cells_name, in of_phandle_iterator_next()
1200 count, it->list_end - it->cur); in of_phandle_iterator_next()
1203 it->parent, of_node_full_name(it->node), in of_phandle_iterator_next()
1204 count, it->list_end - it->cur); in of_phandle_iterator_next()
1209 it->phandle_end = it->cur + count; in of_phandle_iterator_next()
1210 it->cur_count = count; in of_phandle_iterator_next()
1215 if (it->node) { in of_phandle_iterator_next()
1216 of_node_put(it->node); in of_phandle_iterator_next()
1217 it->node = NULL; in of_phandle_iterator_next()
1220 return -EINVAL; in of_phandle_iterator_next()
1230 count = it->cur_count; in of_phandle_iterator_args()
1236 args[i] = be32_to_cpup(it->cur++); in of_phandle_iterator_args()
1251 return -EINVAL; in __of_parse_phandle_with_args()
1259 * or return -ENOENT for an empty entry. in __of_parse_phandle_with_args()
1261 rc = -ENOENT; in __of_parse_phandle_with_args()
1270 out_args->args, in __of_parse_phandle_with_args()
1272 out_args->np = it.node; in __of_parse_phandle_with_args()
1273 out_args->args_count = c; in __of_parse_phandle_with_args()
1275 of_node_put(it.node); in __of_parse_phandle_with_args()
1286 * Unlock node before returning result; will be one of: in __of_parse_phandle_with_args()
1287 * -ENOENT : index is for empty phandle in __of_parse_phandle_with_args()
1288 * -EINVAL : parsing error on data in __of_parse_phandle_with_args()
1292 of_node_put(it.node); in __of_parse_phandle_with_args()
1298 * of_parse_phandle_with_args_map() - Find a node pointed by phandle in a list and remap it
1299 * @np: pointer to a device tree node containing a list
1308 * is that this API remaps a phandle if the node the phandle points to has
1309 * a <@stem_name>-map property.
1311 * Caller is responsible to call of_node_put() on the returned out_args->np
1317 * #list-cells = <2>;
1321 * #list-cells = <1>;
1325 * #list-cells = <1>;
1326 * list-map = <0 &phandle2 3>,
1329 * list-map-mask = <0x3>;
1336 * To get a device_node of the ``node2`` node you may call this:
1356 return -EINVAL; in of_parse_phandle_with_args_map()
1358 cells_name = kasprintf(GFP_KERNEL, "#%s-cells", stem_name); in of_parse_phandle_with_args_map()
1360 return -ENOMEM; in of_parse_phandle_with_args_map()
1362 ret = -ENOMEM; in of_parse_phandle_with_args_map()
1363 map_name = kasprintf(GFP_KERNEL, "%s-map", stem_name); in of_parse_phandle_with_args_map()
1367 mask_name = kasprintf(GFP_KERNEL, "%s-map-mask", stem_name); in of_parse_phandle_with_args_map()
1371 pass_name = kasprintf(GFP_KERNEL, "%s-map-pass-thru", stem_name); in of_parse_phandle_with_args_map()
1375 ret = __of_parse_phandle_with_args(np, list_name, cells_name, -1, index, in of_parse_phandle_with_args_map()
1380 /* Get the #<list>-cells property */ in of_parse_phandle_with_args_map()
1381 cur = out_args->np; in of_parse_phandle_with_args_map()
1386 /* Precalculate the match array - this simplifies match loop */ in of_parse_phandle_with_args_map()
1388 initial_match_array[i] = cpu_to_be32(out_args->args[i]); in of_parse_phandle_with_args_map()
1390 ret = -EINVAL; in of_parse_phandle_with_args_map()
1392 /* Get the <list>-map property */ in of_parse_phandle_with_args_map()
1400 /* Get the <list>-map-mask property (optional) */ in of_parse_phandle_with_args_map()
1404 /* Iterate through <list>-map property */ in of_parse_phandle_with_args_map()
1409 for (i = 0; i < list_size; i++, map_len--) in of_parse_phandle_with_args_map()
1415 map_len--; in of_parse_phandle_with_args_map()
1434 /* Move forward by new node's #<list>-cells amount */ in of_parse_phandle_with_args_map()
1436 map_len -= new_size; in of_parse_phandle_with_args_map()
1441 /* Get the <list>-map-pass-thru property (optional) */ in of_parse_phandle_with_args_map()
1447 * Successfully parsed a <list>-map translation; copy new in of_parse_phandle_with_args_map()
1449 * bits specified in <list>-map-pass-thru. in of_parse_phandle_with_args_map()
1451 match_array = map - new_size; in of_parse_phandle_with_args_map()
1453 __be32 val = *(map - new_size + i); in of_parse_phandle_with_args_map()
1457 val |= cpu_to_be32(out_args->args[i]) & pass[i]; in of_parse_phandle_with_args_map()
1460 out_args->args[i] = be32_to_cpu(val); in of_parse_phandle_with_args_map()
1462 out_args->args_count = list_size = new_size; in of_parse_phandle_with_args_map()
1464 out_args->np = new; in of_parse_phandle_with_args_map()
1482 * of_count_phandle_with_args() - Find the number of phandles references in a property
1483 * @np: pointer to a device tree node containing a list
1490 * by a property in the phandle-target node. For example, a gpios
1493 * determined by the #gpio-cells property in the node pointed to by the
1514 return -ENOENT; in of_count_phandle_with_args()
1519 rc = of_phandle_iterator_init(&it, np, list_name, cells_name, -1); in of_count_phandle_with_args()
1526 if (rc != -ENOENT) in of_count_phandle_with_args()
1537 for (next = list; *next; next = &(*next)->next) { in __of_remove_property_from_list()
1539 *next = prop->next; in __of_remove_property_from_list()
1540 prop->next = NULL; in __of_remove_property_from_list()
1548 * __of_add_property - Add a property to a node without lock operations
1549 * @np: Caller's Device Node
1560 __of_remove_property_from_list(&np->deadprops, prop); in __of_add_property()
1562 prop->next = NULL; in __of_add_property()
1563 next = &np->properties; in __of_add_property()
1565 if (strcmp(prop->name, (*next)->name) == 0) { in __of_add_property()
1567 rc = -EEXIST; in __of_add_property()
1570 next = &(*next)->next; in __of_add_property()
1584 * of_add_property - Add a property to a node
1585 * @np: Caller's Device Node
1606 int rc = -ENODEV; in __of_remove_property()
1610 if (__of_remove_property_from_list(&np->properties, prop)) { in __of_remove_property()
1612 prop->next = np->deadprops; in __of_remove_property()
1613 np->deadprops = prop; in __of_remove_property()
1626 * of_remove_property - Remove a property from a node.
1627 * @np: Caller's Device Node
1631 * who-knows-how-many pointers to the data using get-property.
1640 return -ENODEV; in of_remove_property()
1661 __of_remove_property_from_list(&np->deadprops, newprop); in __of_update_property()
1663 for (next = &np->properties; *next; next = &(*next)->next) { in __of_update_property()
1664 if (of_prop_cmp((*next)->name, newprop->name) == 0) in __of_update_property()
1670 /* replace the node */ in __of_update_property()
1671 newprop->next = oldprop->next; in __of_update_property()
1673 oldprop->next = np->deadprops; in __of_update_property()
1674 np->deadprops = oldprop; in __of_update_property()
1676 /* new node */ in __of_update_property()
1677 newprop->next = NULL; in __of_update_property()
1689 * of_update_property - Update a property in a node, if the property does
1693 * who-knows-how-many pointers to the data using get-property.
1702 if (!newprop->name) in of_update_property()
1703 return -EINVAL; in of_update_property()
1718 ap->np = np; in of_alias_add()
1719 ap->id = id; in of_alias_add()
1720 strscpy(ap->stem, stem, stem_len + 1); in of_alias_add()
1721 list_add_tail(&ap->link, &aliases_lookup); in of_alias_add()
1722 pr_debug("adding DT alias:%s: stem=%s id=%i node=%pOF\n", in of_alias_add()
1723 ap->alias, ap->stem, ap->id, np); in of_alias_add()
1727 * of_alias_scan - Scan all properties of the 'aliases' node
1731 * The function scans all the properties of the 'aliases' node and populates
1745 /* linux,stdout-path and /aliases/stdout are for legacy compatibility */ in of_alias_scan()
1748 if (of_property_read_string(of_chosen, "stdout-path", &name)) in of_alias_scan()
1749 of_property_read_string(of_chosen, "linux,stdout-path", in of_alias_scan()
1756 of_stdout->fwnode.flags |= FWNODE_FLAG_BEST_EFFORT; in of_alias_scan()
1763 const char *start = pp->name; in of_alias_scan()
1770 if (!strcmp(pp->name, "name") || in of_alias_scan()
1771 !strcmp(pp->name, "phandle") || in of_alias_scan()
1772 !strcmp(pp->name, "linux,phandle")) in of_alias_scan()
1775 np = of_find_node_by_path(pp->value); in of_alias_scan()
1781 while (isdigit(*(end-1)) && end > start) in of_alias_scan()
1782 end--; in of_alias_scan()
1783 len = end - start; in of_alias_scan()
1793 ap->alias = start; in of_alias_scan()
1799 * of_alias_get_id - Get alias id for the given device_node
1811 int id = -ENODEV; in of_alias_get_id()
1815 if (strcmp(app->stem, stem) != 0) in of_alias_get_id()
1818 if (np == app->np) { in of_alias_get_id()
1819 id = app->id; in of_alias_get_id()
1830 * of_alias_get_highest_id - Get highest alias id for the given stem
1839 int id = -ENODEV; in of_alias_get_highest_id()
1843 if (strcmp(app->stem, stem) != 0) in of_alias_get_highest_id()
1846 if (app->id > id) in of_alias_get_highest_id()
1847 id = app->id; in of_alias_get_highest_id()
1856 * of_console_check() - Test and setup console for DT setup
1857 * @dn: Pointer to device node
1861 * Check if the given device node matches the stdout-path property in the
1862 * /chosen node. If it does then register it as the preferred console.
1880 * of_find_next_cache_node - Find a node's subsidiary cache
1881 * @np: node of type "cpu" or "cache"
1883 * Return: A node pointer with refcount incremented, use
1889 struct device_node *child, *cache_node; in of_find_next_cache_node() local
1891 cache_node = of_parse_phandle(np, "l2-cache", 0); in of_find_next_cache_node()
1893 cache_node = of_parse_phandle(np, "next-level-cache", 0); in of_find_next_cache_node()
1898 /* OF on pmac has nodes instead of properties named "l2-cache" in of_find_next_cache_node()
1902 for_each_child_of_node(np, child) in of_find_next_cache_node()
1903 if (of_node_is_type(child, "cache")) in of_find_next_cache_node()
1904 return child; in of_find_next_cache_node()
1910 * of_find_last_cache_level - Find the level at which the last cache is
1929 of_property_read_u32(prev, "cache-level", &cache_level); in of_find_last_cache_level()
1936 * of_map_id - Translate an ID through a downstream mapping.
1937 * @np: root complex device node.
1941 * @target: optional pointer to a target device node.
1944 * Given a device ID, look up the appropriate implementation-defined
1946 * ID, as per the "iommu-map" and "msi-map" bindings. Either of @target or
1948 * a non-NULL device node pointer, only entries targeting that node will be
1949 * matched; if it points to a NULL value, it will receive the device node of
1963 return -EINVAL; in of_map_id()
1968 return -ENODEV; in of_map_id()
1977 return -EINVAL; in of_map_id()
1984 * Can be overridden by "{iommu,msi}-map-mask" property. in of_map_id()
1991 for ( ; map_len > 0; map_len -= 4 * sizeof(*map), map += 4) { in of_map_id()
1999 pr_err("%pOF: Invalid %s translation - %s-mask (0x%x) ignores id-base (0x%x)\n", in of_map_id()
2002 return -EFAULT; in of_map_id()
2010 return -ENODEV; in of_map_id()
2023 *id_out = masked_id - id_base + out_base; in of_map_id()
2025 …pr_debug("%pOF: %s, using mask %08x, id-base: %08x, out-base: %08x, length: %08x, id: %08x -> %08x… in of_map_id()
2027 id_len, id, masked_id - id_base + out_base); in of_map_id()