Lines Matching +full:display +full:- +full:depth
1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Portions from U-Boot cmd_fdt.c (C) Copyright 2007
33 enum display_mode mode; /* display mode that we are using */
48 * @param disp Display information / options
49 * @param data Data to display
51 * @return 0 if ok, -1 if data does not match format
66 is_string = (disp->type) == 's' || in show_data()
67 (!disp->type && util_is_printable_string(data, len)); in show_data()
69 if (data[len - 1] != '\0') { in show_data()
71 return -1; in show_data()
73 for (s = data; s - data < len; s += strlen(s) + 1) { in show_data()
80 size = disp->size; in show_data()
81 if (size == -1) { in show_data()
86 return -1; in show_data()
89 fmt[1] = disp->type ? disp->type : 'd'; in show_data()
105 * @param node Node to display
118 return prop == -FDT_ERR_NOTFOUND ? 0 : prop; in list_properties()
120 name = fdt_string(blob, fdt32_to_cpu(data->nameoff)); in list_properties()
133 * @param node Node to display
142 int depth = 1; /* the assumed depth of this node */ in list_subnodes() local
149 if (level <= depth) { in list_subnodes()
164 level--; in list_subnodes()
166 level = -1; /* exit the loop */ in list_subnodes()
173 if (level <= depth) in list_subnodes()
184 * display option provided.
187 * @param disp Display information / options
188 * @param node Node to display
189 * @param property Name of property to display, or NULL if none
190 * @return 0 if ok, -ve on error
198 switch (disp->mode) { in show_data_for_item()
212 err = -1; in show_data_for_item()
215 } else if (disp->default_val) { in show_data_for_item()
216 puts(disp->default_val); in show_data_for_item()
219 err = -1; in show_data_for_item()
230 * @param disp Display information / options
234 * @param return 0 if ok, -ve on error
245 return -1; in do_fdtget()
250 if (disp->default_val) { in do_fdtget()
251 puts(disp->default_val); in do_fdtget()
255 return -1; in do_fdtget()
261 return -1; in do_fdtget()
267 "fdtget - read values from device tree\n"
272 " fdtget -p <options> <dt file> [<node> ]...\n"
274 "\t-t <type>\tType of data\n"
275 "\t-p\t\tList properties for each node\n"
276 "\t-l\t\tList subnodes for each node\n"
277 "\t-d\t\tDefault value to display when the property is "
279 "\t-h\t\tPrint this help\n\n"
299 disp.size = -1; in main()
303 if (c == -1) in main()
339 argc -= optind; in main()