Lines Matching refs:it

1261 int of_phandle_iterator_init(struct of_phandle_iterator *it,  in of_phandle_iterator_init()  argument
1270 memset(it, 0, sizeof(*it)); in of_phandle_iterator_init()
1283 it->cells_name = cells_name; in of_phandle_iterator_init()
1284 it->cell_count = cell_count; in of_phandle_iterator_init()
1285 it->parent = np; in of_phandle_iterator_init()
1286 it->list_end = list + size / sizeof(*list); in of_phandle_iterator_init()
1287 it->phandle_end = list; in of_phandle_iterator_init()
1288 it->cur = list; in of_phandle_iterator_init()
1294 int of_phandle_iterator_next(struct of_phandle_iterator *it) in of_phandle_iterator_next() argument
1298 if (it->node) { in of_phandle_iterator_next()
1299 of_node_put(it->node); in of_phandle_iterator_next()
1300 it->node = NULL; in of_phandle_iterator_next()
1303 if (!it->cur || it->phandle_end >= it->list_end) in of_phandle_iterator_next()
1306 it->cur = it->phandle_end; in of_phandle_iterator_next()
1309 it->phandle = be32_to_cpup(it->cur++); in of_phandle_iterator_next()
1311 if (it->phandle) { in of_phandle_iterator_next()
1317 it->node = of_find_node_by_phandle(it->phandle); in of_phandle_iterator_next()
1319 if (it->cells_name) { in of_phandle_iterator_next()
1320 if (!it->node) { in of_phandle_iterator_next()
1322 it->parent, it->phandle); in of_phandle_iterator_next()
1326 if (of_property_read_u32(it->node, it->cells_name, in of_phandle_iterator_next()
1333 if (it->cell_count >= 0) { in of_phandle_iterator_next()
1334 count = it->cell_count; in of_phandle_iterator_next()
1337 it->parent, in of_phandle_iterator_next()
1338 it->cells_name, in of_phandle_iterator_next()
1339 it->node); in of_phandle_iterator_next()
1344 count = it->cell_count; in of_phandle_iterator_next()
1351 if (it->cur + count > it->list_end) { in of_phandle_iterator_next()
1353 it->parent, it->cells_name, in of_phandle_iterator_next()
1354 count, it->cell_count); in of_phandle_iterator_next()
1359 it->phandle_end = it->cur + count; in of_phandle_iterator_next()
1360 it->cur_count = count; in of_phandle_iterator_next()
1365 if (it->node) { in of_phandle_iterator_next()
1366 of_node_put(it->node); in of_phandle_iterator_next()
1367 it->node = NULL; in of_phandle_iterator_next()
1374 int of_phandle_iterator_args(struct of_phandle_iterator *it, in of_phandle_iterator_args() argument
1380 count = it->cur_count; in of_phandle_iterator_args()
1386 args[i] = be32_to_cpup(it->cur++); in of_phandle_iterator_args()
1397 struct of_phandle_iterator it; in __of_parse_phandle_with_args() local
1401 of_for_each_phandle(&it, rc, np, list_name, cells_name, cell_count) { in __of_parse_phandle_with_args()
1410 if (!it.phandle) in __of_parse_phandle_with_args()
1416 c = of_phandle_iterator_args(&it, in __of_parse_phandle_with_args()
1419 out_args->np = it.node; in __of_parse_phandle_with_args()
1422 of_node_put(it.node); in __of_parse_phandle_with_args()
1439 of_node_put(it.node); in __of_parse_phandle_with_args()
1762 struct of_phandle_iterator it; in of_count_phandle_with_args() local
1782 rc = of_phandle_iterator_init(&it, np, list_name, cells_name, -1); in of_count_phandle_with_args()
1786 while ((rc = of_phandle_iterator_next(&it)) == 0) in of_count_phandle_with_args()