Lines Matching refs:it

1278 int of_phandle_iterator_init(struct of_phandle_iterator *it,  in of_phandle_iterator_init()  argument
1287 memset(it, 0, sizeof(*it)); in of_phandle_iterator_init()
1300 it->cells_name = cells_name; in of_phandle_iterator_init()
1301 it->cell_count = cell_count; in of_phandle_iterator_init()
1302 it->parent = np; in of_phandle_iterator_init()
1303 it->list_end = list + size / sizeof(*list); in of_phandle_iterator_init()
1304 it->phandle_end = list; in of_phandle_iterator_init()
1305 it->cur = list; in of_phandle_iterator_init()
1311 int of_phandle_iterator_next(struct of_phandle_iterator *it) in of_phandle_iterator_next() argument
1315 if (it->node) { in of_phandle_iterator_next()
1316 of_node_put(it->node); in of_phandle_iterator_next()
1317 it->node = NULL; in of_phandle_iterator_next()
1320 if (!it->cur || it->phandle_end >= it->list_end) in of_phandle_iterator_next()
1323 it->cur = it->phandle_end; in of_phandle_iterator_next()
1326 it->phandle = be32_to_cpup(it->cur++); in of_phandle_iterator_next()
1328 if (it->phandle) { in of_phandle_iterator_next()
1334 it->node = of_find_node_by_phandle(it->phandle); in of_phandle_iterator_next()
1336 if (it->cells_name) { in of_phandle_iterator_next()
1337 if (!it->node) { in of_phandle_iterator_next()
1339 it->parent); in of_phandle_iterator_next()
1343 if (of_property_read_u32(it->node, it->cells_name, in of_phandle_iterator_next()
1350 if (it->cell_count >= 0) { in of_phandle_iterator_next()
1351 count = it->cell_count; in of_phandle_iterator_next()
1354 it->parent, in of_phandle_iterator_next()
1355 it->cells_name, in of_phandle_iterator_next()
1356 it->node); in of_phandle_iterator_next()
1361 count = it->cell_count; in of_phandle_iterator_next()
1368 if (it->cur + count > it->list_end) { in of_phandle_iterator_next()
1370 it->parent, it->cells_name, in of_phandle_iterator_next()
1371 count, it->cell_count); in of_phandle_iterator_next()
1376 it->phandle_end = it->cur + count; in of_phandle_iterator_next()
1377 it->cur_count = count; in of_phandle_iterator_next()
1382 if (it->node) { in of_phandle_iterator_next()
1383 of_node_put(it->node); in of_phandle_iterator_next()
1384 it->node = NULL; in of_phandle_iterator_next()
1391 int of_phandle_iterator_args(struct of_phandle_iterator *it, in of_phandle_iterator_args() argument
1397 count = it->cur_count; in of_phandle_iterator_args()
1403 args[i] = be32_to_cpup(it->cur++); in of_phandle_iterator_args()
1414 struct of_phandle_iterator it; in __of_parse_phandle_with_args() local
1418 of_for_each_phandle(&it, rc, np, list_name, cells_name, cell_count) { in __of_parse_phandle_with_args()
1427 if (!it.phandle) in __of_parse_phandle_with_args()
1433 c = of_phandle_iterator_args(&it, in __of_parse_phandle_with_args()
1436 out_args->np = it.node; in __of_parse_phandle_with_args()
1439 of_node_put(it.node); in __of_parse_phandle_with_args()
1456 of_node_put(it.node); in __of_parse_phandle_with_args()
1779 struct of_phandle_iterator it; in of_count_phandle_with_args() local
1799 rc = of_phandle_iterator_init(&it, np, list_name, cells_name, -1); in of_count_phandle_with_args()
1803 while ((rc = of_phandle_iterator_next(&it)) == 0) in of_count_phandle_with_args()