Lines Matching refs:it

1159 int of_phandle_iterator_init(struct of_phandle_iterator *it,  in of_phandle_iterator_init()  argument
1168 memset(it, 0, sizeof(*it)); in of_phandle_iterator_init()
1181 it->cells_name = cells_name; in of_phandle_iterator_init()
1182 it->cell_count = cell_count; in of_phandle_iterator_init()
1183 it->parent = np; in of_phandle_iterator_init()
1184 it->list_end = list + size / sizeof(*list); in of_phandle_iterator_init()
1185 it->phandle_end = list; in of_phandle_iterator_init()
1186 it->cur = list; in of_phandle_iterator_init()
1192 int of_phandle_iterator_next(struct of_phandle_iterator *it) in of_phandle_iterator_next() argument
1196 if (it->node) { in of_phandle_iterator_next()
1197 of_node_put(it->node); in of_phandle_iterator_next()
1198 it->node = NULL; in of_phandle_iterator_next()
1201 if (!it->cur || it->phandle_end >= it->list_end) in of_phandle_iterator_next()
1204 it->cur = it->phandle_end; in of_phandle_iterator_next()
1207 it->phandle = be32_to_cpup(it->cur++); in of_phandle_iterator_next()
1209 if (it->phandle) { in of_phandle_iterator_next()
1215 it->node = of_find_node_by_phandle(it->phandle); in of_phandle_iterator_next()
1217 if (it->cells_name) { in of_phandle_iterator_next()
1218 if (!it->node) { in of_phandle_iterator_next()
1220 it->parent, it->phandle); in of_phandle_iterator_next()
1224 if (of_property_read_u32(it->node, it->cells_name, in of_phandle_iterator_next()
1231 if (it->cell_count >= 0) { in of_phandle_iterator_next()
1232 count = it->cell_count; in of_phandle_iterator_next()
1235 it->parent, in of_phandle_iterator_next()
1236 it->cells_name, in of_phandle_iterator_next()
1237 it->node); in of_phandle_iterator_next()
1242 count = it->cell_count; in of_phandle_iterator_next()
1249 if (it->cur + count > it->list_end) { in of_phandle_iterator_next()
1250 if (it->cells_name) in of_phandle_iterator_next()
1252 it->parent, it->cells_name, in of_phandle_iterator_next()
1253 count, it->list_end - it->cur); in of_phandle_iterator_next()
1256 it->parent, of_node_full_name(it->node), in of_phandle_iterator_next()
1257 count, it->list_end - it->cur); in of_phandle_iterator_next()
1262 it->phandle_end = it->cur + count; in of_phandle_iterator_next()
1263 it->cur_count = count; in of_phandle_iterator_next()
1268 if (it->node) { in of_phandle_iterator_next()
1269 of_node_put(it->node); in of_phandle_iterator_next()
1270 it->node = NULL; in of_phandle_iterator_next()
1277 int of_phandle_iterator_args(struct of_phandle_iterator *it, in of_phandle_iterator_args() argument
1283 count = it->cur_count; in of_phandle_iterator_args()
1289 args[i] = be32_to_cpup(it->cur++); in of_phandle_iterator_args()
1300 struct of_phandle_iterator it; in __of_parse_phandle_with_args() local
1307 of_for_each_phandle(&it, rc, np, list_name, cells_name, cell_count) { in __of_parse_phandle_with_args()
1316 if (!it.phandle) in __of_parse_phandle_with_args()
1322 c = of_phandle_iterator_args(&it, in __of_parse_phandle_with_args()
1325 out_args->np = it.node; in __of_parse_phandle_with_args()
1328 of_node_put(it.node); in __of_parse_phandle_with_args()
1345 of_node_put(it.node); in __of_parse_phandle_with_args()
1534 struct of_phandle_iterator it; in of_count_phandle_with_args() local
1554 rc = of_phandle_iterator_init(&it, np, list_name, cells_name, -1); in of_count_phandle_with_args()
1558 while ((rc = of_phandle_iterator_next(&it)) == 0) in of_count_phandle_with_args()