Lines Matching defs:offset

37 static int _fdt_nodename_eq(const void *fdt, int offset,
40 const char *p = fdt_offset_ptr(fdt, offset + FDT_TAGSIZE, len+1);
87 static int _nextprop(const void *fdt, int offset)
93 tag = fdt_next_tag(fdt, offset, &nextoffset);
103 return offset;
105 offset = nextoffset;
111 int fdt_subnode_offset_namelen(const void *fdt, int offset,
119 (offset >= 0) && (depth >= 0);
120 offset = fdt_next_node(fdt, offset, &depth))
122 && _fdt_nodename_eq(fdt, offset, name, namelen))
123 return offset;
127 return offset; /* error */
140 int offset = 0;
154 offset = fdt_path_offset(fdt, p);
165 return offset;
170 offset = fdt_subnode_offset_namelen(fdt, offset, p, q-p);
171 if (offset < 0)
172 return offset;
177 return offset;
202 int offset;
204 if ((offset = _fdt_check_node_offset(fdt, nodeoffset)) < 0)
205 return offset;
207 return _nextprop(fdt, offset);
210 int fdt_next_property_offset(const void *fdt, int offset)
212 if ((offset = _fdt_check_prop_offset(fdt, offset)) < 0)
213 return offset;
215 return _nextprop(fdt, offset);
219 int offset,
225 if ((err = _fdt_check_prop_offset(fdt, offset)) < 0) {
231 prop = _fdt_offset_ptr(fdt, offset);
240 int offset,
244 for (offset = fdt_first_property_offset(fdt, offset);
245 (offset >= 0);
246 (offset = fdt_next_property_offset(fdt, offset))) {
249 if (!(prop = fdt_get_property_by_offset(fdt, offset, lenp))) {
250 offset = -FDT_ERR_INTERNAL;
259 *lenp = offset;
283 const void *fdt_getprop_by_offset(const void *fdt, int offset,
288 prop = fdt_get_property_by_offset(fdt, offset, lenp);
339 int offset, depth, namelen;
347 for (offset = 0, depth = 0;
348 (offset >= 0) && (offset <= nodeoffset);
349 offset = fdt_next_node(fdt, offset, &depth)) {
358 name = fdt_get_name(fdt, offset, &namelen);
369 if (offset == nodeoffset) {
380 if ((offset == -FDT_ERR_NOTFOUND) || (offset >= 0))
382 else if (offset == -FDT_ERR_BADOFFSET)
385 return offset; /* error from fdt_next_node() */
391 int offset, depth;
399 for (offset = 0, depth = 0;
400 (offset >= 0) && (offset <= nodeoffset);
401 offset = fdt_next_node(fdt, offset, &depth)) {
403 supernodeoffset = offset;
405 if (offset == nodeoffset) {
416 if ((offset == -FDT_ERR_NOTFOUND) || (offset >= 0))
418 else if (offset == -FDT_ERR_BADOFFSET)
421 return offset; /* error from fdt_next_node() */
449 int offset;
460 for (offset = fdt_next_node(fdt, startoffset, NULL);
461 offset >= 0;
462 offset = fdt_next_node(fdt, offset, NULL)) {
463 val = fdt_getprop(fdt, offset, propname, &len);
466 return offset;
469 return offset; /* error from fdt_next_node() */
474 int offset;
487 for (offset = fdt_next_node(fdt, -1, NULL);
488 offset >= 0;
489 offset = fdt_next_node(fdt, offset, NULL)) {
490 if (fdt_get_phandle(fdt, offset) == phandle)
491 return offset;
494 return offset; /* error from fdt_next_node() */
533 int offset, err;
542 for (offset = fdt_next_node(fdt, startoffset, NULL);
543 offset >= 0;
544 offset = fdt_next_node(fdt, offset, NULL)) {
545 err = fdt_node_check_compatible(fdt, offset, compatible);
549 return offset;
552 return offset; /* error from fdt_next_node() */