Lines Matching refs:it

1106 int of_phandle_iterator_init(struct of_phandle_iterator *it,  in of_phandle_iterator_init()  argument
1115 memset(it, 0, sizeof(*it)); in of_phandle_iterator_init()
1128 it->cells_name = cells_name; in of_phandle_iterator_init()
1129 it->cell_count = cell_count; in of_phandle_iterator_init()
1130 it->parent = np; in of_phandle_iterator_init()
1131 it->list_end = list + size / sizeof(*list); in of_phandle_iterator_init()
1132 it->phandle_end = list; in of_phandle_iterator_init()
1133 it->cur = list; in of_phandle_iterator_init()
1139 int of_phandle_iterator_next(struct of_phandle_iterator *it) in of_phandle_iterator_next() argument
1143 if (it->node) { in of_phandle_iterator_next()
1144 of_node_put(it->node); in of_phandle_iterator_next()
1145 it->node = NULL; in of_phandle_iterator_next()
1148 if (!it->cur || it->phandle_end >= it->list_end) in of_phandle_iterator_next()
1151 it->cur = it->phandle_end; in of_phandle_iterator_next()
1154 it->phandle = be32_to_cpup(it->cur++); in of_phandle_iterator_next()
1156 if (it->phandle) { in of_phandle_iterator_next()
1162 it->node = of_find_node_by_phandle(it->phandle); in of_phandle_iterator_next()
1164 if (it->cells_name) { in of_phandle_iterator_next()
1165 if (!it->node) { in of_phandle_iterator_next()
1167 it->parent, it->phandle); in of_phandle_iterator_next()
1171 if (of_property_read_u32(it->node, it->cells_name, in of_phandle_iterator_next()
1178 if (it->cell_count >= 0) { in of_phandle_iterator_next()
1179 count = it->cell_count; in of_phandle_iterator_next()
1182 it->parent, in of_phandle_iterator_next()
1183 it->cells_name, in of_phandle_iterator_next()
1184 it->node); in of_phandle_iterator_next()
1189 count = it->cell_count; in of_phandle_iterator_next()
1196 if (it->cur + count > it->list_end) { in of_phandle_iterator_next()
1197 if (it->cells_name) in of_phandle_iterator_next()
1199 it->parent, it->cells_name, in of_phandle_iterator_next()
1200 count, it->list_end - it->cur); in of_phandle_iterator_next()
1203 it->parent, of_node_full_name(it->node), in of_phandle_iterator_next()
1204 count, it->list_end - it->cur); in of_phandle_iterator_next()
1209 it->phandle_end = it->cur + count; in of_phandle_iterator_next()
1210 it->cur_count = count; in of_phandle_iterator_next()
1215 if (it->node) { in of_phandle_iterator_next()
1216 of_node_put(it->node); in of_phandle_iterator_next()
1217 it->node = NULL; in of_phandle_iterator_next()
1224 int of_phandle_iterator_args(struct of_phandle_iterator *it, in of_phandle_iterator_args() argument
1230 count = it->cur_count; in of_phandle_iterator_args()
1236 args[i] = be32_to_cpup(it->cur++); in of_phandle_iterator_args()
1247 struct of_phandle_iterator it; in __of_parse_phandle_with_args() local
1254 of_for_each_phandle(&it, rc, np, list_name, cells_name, cell_count) { in __of_parse_phandle_with_args()
1263 if (!it.phandle) in __of_parse_phandle_with_args()
1269 c = of_phandle_iterator_args(&it, in __of_parse_phandle_with_args()
1272 out_args->np = it.node; in __of_parse_phandle_with_args()
1275 of_node_put(it.node); in __of_parse_phandle_with_args()
1292 of_node_put(it.node); in __of_parse_phandle_with_args()
1505 struct of_phandle_iterator it; in of_count_phandle_with_args() local
1525 rc = of_phandle_iterator_init(&it, np, list_name, cells_name, -1); in of_count_phandle_with_args()
1529 while ((rc = of_phandle_iterator_next(&it)) == 0) in of_count_phandle_with_args()