Lines Matching refs:it

1288 int of_phandle_iterator_init(struct of_phandle_iterator *it,  in of_phandle_iterator_init()  argument
1297 memset(it, 0, sizeof(*it)); in of_phandle_iterator_init()
1310 it->cells_name = cells_name; in of_phandle_iterator_init()
1311 it->cell_count = cell_count; in of_phandle_iterator_init()
1312 it->parent = np; in of_phandle_iterator_init()
1313 it->list_end = list + size / sizeof(*list); in of_phandle_iterator_init()
1314 it->phandle_end = list; in of_phandle_iterator_init()
1315 it->cur = list; in of_phandle_iterator_init()
1321 int of_phandle_iterator_next(struct of_phandle_iterator *it) in of_phandle_iterator_next() argument
1325 if (it->node) { in of_phandle_iterator_next()
1326 of_node_put(it->node); in of_phandle_iterator_next()
1327 it->node = NULL; in of_phandle_iterator_next()
1330 if (!it->cur || it->phandle_end >= it->list_end) in of_phandle_iterator_next()
1333 it->cur = it->phandle_end; in of_phandle_iterator_next()
1336 it->phandle = be32_to_cpup(it->cur++); in of_phandle_iterator_next()
1338 if (it->phandle) { in of_phandle_iterator_next()
1344 it->node = of_find_node_by_phandle(it->phandle); in of_phandle_iterator_next()
1346 if (it->cells_name) { in of_phandle_iterator_next()
1347 if (!it->node) { in of_phandle_iterator_next()
1349 it->parent, it->phandle); in of_phandle_iterator_next()
1353 if (of_property_read_u32(it->node, it->cells_name, in of_phandle_iterator_next()
1360 if (it->cell_count >= 0) { in of_phandle_iterator_next()
1361 count = it->cell_count; in of_phandle_iterator_next()
1364 it->parent, in of_phandle_iterator_next()
1365 it->cells_name, in of_phandle_iterator_next()
1366 it->node); in of_phandle_iterator_next()
1371 count = it->cell_count; in of_phandle_iterator_next()
1378 if (it->cur + count > it->list_end) { in of_phandle_iterator_next()
1379 if (it->cells_name) in of_phandle_iterator_next()
1381 it->parent, it->cells_name, in of_phandle_iterator_next()
1382 count, it->list_end - it->cur); in of_phandle_iterator_next()
1385 it->parent, of_node_full_name(it->node), in of_phandle_iterator_next()
1386 count, it->list_end - it->cur); in of_phandle_iterator_next()
1391 it->phandle_end = it->cur + count; in of_phandle_iterator_next()
1392 it->cur_count = count; in of_phandle_iterator_next()
1397 if (it->node) { in of_phandle_iterator_next()
1398 of_node_put(it->node); in of_phandle_iterator_next()
1399 it->node = NULL; in of_phandle_iterator_next()
1406 int of_phandle_iterator_args(struct of_phandle_iterator *it, in of_phandle_iterator_args() argument
1412 count = it->cur_count; in of_phandle_iterator_args()
1418 args[i] = be32_to_cpup(it->cur++); in of_phandle_iterator_args()
1429 struct of_phandle_iterator it; in __of_parse_phandle_with_args() local
1436 of_for_each_phandle(&it, rc, np, list_name, cells_name, cell_count) { in __of_parse_phandle_with_args()
1445 if (!it.phandle) in __of_parse_phandle_with_args()
1451 c = of_phandle_iterator_args(&it, in __of_parse_phandle_with_args()
1454 out_args->np = it.node; in __of_parse_phandle_with_args()
1457 of_node_put(it.node); in __of_parse_phandle_with_args()
1474 of_node_put(it.node); in __of_parse_phandle_with_args()
1681 struct of_phandle_iterator it; in of_count_phandle_with_args() local
1701 rc = of_phandle_iterator_init(&it, np, list_name, cells_name, -1); in of_count_phandle_with_args()
1705 while ((rc = of_phandle_iterator_next(&it)) == 0) in of_count_phandle_with_args()