Lines Matching refs:it
246 * of_node_put() will be called on it
249 * of_node_put() on it when done.
517 * of_node_put() on it when done.
538 * This is like of_get_parent() except that it drops the
539 * refcount on the passed node, making it suitable for iterating
543 * of_node_put() on it when done.
584 * it when done. Returns NULL when prev is the last child. Decrements the
605 * This function is like of_get_next_child(), except that it
639 * on it when done. Returns NULL when prev is the last child. Decrements
681 * Return: a node pointer with refcount incremented, use of_node_put() on it
706 * of_node_put() on it when done.
773 * of_node_put() on it when done.
831 * of_node_put() on it when done.
859 * of_node_put() on it when done.
883 * returned. of_node_put() will be called on it
889 * of_node_put() on it when done.
914 * returned. of_node_put() will be called on it
918 * of_node_put() on it when done.
991 * returned. of_node_put() will be called on it
996 * of_node_put() on it when done.
1060 * of_node_put() on it when done.
1106 int of_phandle_iterator_init(struct of_phandle_iterator *it,
1115 memset(it, 0, sizeof(*it));
1128 it->cells_name = cells_name;
1129 it->cell_count = cell_count;
1130 it->parent = np;
1131 it->list_end = list + size / sizeof(*list);
1132 it->phandle_end = list;
1133 it->cur = list;
1139 int of_phandle_iterator_next(struct of_phandle_iterator *it)
1143 if (it->node) {
1144 of_node_put(it->node);
1145 it->node = NULL;
1148 if (!it->cur || it->phandle_end >= it->list_end)
1151 it->cur = it->phandle_end;
1153 /* If phandle is 0, then it is an empty entry with no arguments. */
1154 it->phandle = be32_to_cpup(it->cur++);
1156 if (it->phandle) {
1162 it->node = of_find_node_by_phandle(it->phandle);
1164 if (it->cells_name) {
1165 if (!it->node) {
1167 it->parent, it->phandle);
1171 if (of_property_read_u32(it->node, it->cells_name,
1178 if (it->cell_count >= 0) {
1179 count = it->cell_count;
1182 it->parent,
1183 it->cells_name,
1184 it->node);
1189 count = it->cell_count;
1196 if (it->cur + count > it->list_end) {
1197 if (it->cells_name)
1199 it->parent, it->cells_name,
1200 count, it->list_end - it->cur);
1203 it->parent, of_node_full_name(it->node),
1204 count, it->list_end - it->cur);
1209 it->phandle_end = it->cur + count;
1210 it->cur_count = count;
1215 if (it->node) {
1216 of_node_put(it->node);
1217 it->node = NULL;
1224 int of_phandle_iterator_args(struct of_phandle_iterator *it,
1230 count = it->cur_count;
1236 args[i] = be32_to_cpup(it->cur++);
1247 struct of_phandle_iterator it;
1254 of_for_each_phandle(&it, rc, np, list_name, cells_name, cell_count) {
1263 if (!it.phandle)
1269 c = of_phandle_iterator_args(&it,
1272 out_args->np = it.node;
1275 of_node_put(it.node);
1278 /* Found it! return success */
1292 of_node_put(it.node);
1298 * of_parse_phandle_with_args_map() - Find a node pointed by phandle in a list and remap it
1500 struct of_phandle_iterator it;
1520 rc = of_phandle_iterator_init(&it, np, list_name, cells_name, -1);
1524 while ((rc = of_phandle_iterator_next(&it)) == 0)
1567 /* duplicate ! don't insert it */
1612 /* Found the property, add it to deadprops list */
1631 * Note that we don't actually remove it, since we have given out
1634 * list, so it won't be found any more.
1691 * not exist, add it.
1693 * Note that we don't actually remove it, since we have given out
1863 * /chosen node. If it does then register it as the preferred console.
1885 * of_node_put() on it when done. Caller should hold a reference
1950 * matched; if it points to a NULL value, it will receive the device node of