Lines Matching +full:dt +full:- +full:property
1 /* SPDX-License-Identifier: GPL-2.0+ */
20 * ofnode - reference to a device tree node
24 * latter case, the pointer value is just the integer offset within the flat DT.
32 * NULL, or an offset of -1.
44 * the DT.
62 * _ofnode_to_np() - convert an ofnode to a live DT node pointer
79 * ofnode_to_offset() - convert an ofnode to a flat DT offset
84 * @return DT offset (can be -1)
90 return -1; in ofnode_to_offset()
96 * ofnode_valid() - check if an ofnode is valid
105 return node.of_offset != -1; in ofnode_valid()
109 * offset_to_ofnode() - convert a DT offset to an ofnode
111 * @of_offset: DT offset (either valid, or -1)
112 * @return reference to the associated DT offset
127 * np_to_ofnode() - convert a node pointer to an ofnode
142 * ofnode_is_np() - check if a reference is a node pointer
145 * references will use it. This is because using the flat DT when the live tree
149 * @return true if the reference is a live node pointer, false if it is a DT
167 * ofnode_equal() - check if two references are equal
178 * ofnode_null() - Obtain a null ofnode
190 node.of_offset = -1; in ofnode_null()
196 * ofnode_read_u32() - Read a 32-bit integer from a property
198 * @ref: valid node reference to read property from
199 * @propname: name of the property to read from
201 * @return 0 if OK, -ve on error
206 * ofnode_read_s32() - Read a 32-bit integer from a property
208 * @ref: valid node reference to read property from
209 * @propname: name of the property to read from
211 * @return 0 if OK, -ve on error
220 * ofnode_read_u32_default() - Read a 32-bit integer from a property
222 * @ref: valid node reference to read property from
223 * @propname: name of the property to read from
224 * @def: default value to return if the property has no value
225 * @return property value, or @def if not found
230 * ofnode_read_s32_default() - Read a 32-bit integer from a property
232 * @ref: valid node reference to read property from
233 * @propname: name of the property to read from
234 * @def: default value to return if the property has no value
235 * @return property value, or @def if not found
240 * ofnode_read_u64() - Read a 64-bit integer from a property
242 * @node: valid node reference to read property from
243 * @propname: name of the property to read from
245 * @return 0 if OK, -ve on error
250 * ofnode_read_u64_default() - Read a 64-bit integer from a property
252 * @ref: valid node reference to read property from
253 * @propname: name of the property to read from
254 * @def: default value to return if the property has no value
255 * @return property value, or @def if not found
260 * ofnode_read_string() - Read a string from a property
262 * @ref: valid node reference to read property from
263 * @propname: name of the property to read
264 * @return string from property value, or NULL if there is no such property
269 * ofnode_read_u32_array() - Find and read an array of 32 bit integers
271 * @node: valid node reference to read property from
272 * @propname: name of the property to read
275 * @return 0 if OK, -ve on error
277 * Search for a property in a device node and read 32-bit value(s) from
278 * it. Returns 0 on success, -EINVAL if the property does not exist,
279 * -ENODATA if property does not have a value, and -EOVERFLOW if the
280 * property data isn't large enough.
288 * ofnode_read_bool() - read a boolean value from a property
290 * @node: valid node reference to read property from
291 * @propname: name of property to read
292 * @return true if property is present (meaning true), false if not present
297 * ofnode_find_subnode() - find a named subnode of a parent node
307 * ofnode_first_subnode() - find the first subnode of a parent node
316 * ofnode_next_subnode() - find the next sibling of a subnode
325 * ofnode_get_parent() - get the ofnode's parent (enclosing ofnode)
333 * ofnode_get_name() - get the name of a node
341 * ofnode_get_by_phandle() - get ofnode from phandle
349 * ofnode_read_size() - read the size of a property
352 * @propname: property to check
353 * @return size of property if present, or -EINVAL if not
358 * ofnode_get_addr_index() - get an address from a node
369 * ofnode_get_addr() - get an address from a node
379 * ofnode_stringlist_search() - find a string in a string list and return index
381 * Note that it is possible for this function to succeed on property values
382 * that are not NUL-terminated. That's because the function will stop after
384 * small-valued cell properties, such as #address-cells, when searching for
388 * @propname: name of the property containing the string list
393 * -ENODATA if the property is not found
394 * -EINVAL on some other error
400 * ofnode_read_string_index() - obtain an indexed string from a string list
403 * non-NUL-terminated values. For example on small-valued cell properties
406 * If non-NULL, the length of the string (on success) or a negative error-code
410 * @propname: name of the property containing the string list
415 * length of string, if found or -ve error value if not found
421 * ofnode_read_string_count() - find the number of strings in a string list
424 * @propname: name of the property containing the string list
426 * number of strings in the list, or -ve error value if not found
428 int ofnode_read_string_count(ofnode node, const char *property);
431 * ofnode_parse_phandle_with_args() - Find a node pointed by phandle in a list
437 * Caller is responsible to call of_node_put() on the returned out_args->np
443 * #list-cells = <2>;
447 * #list-cells = <1>;
455 * ofnode_parse_phandle_with_args(node3, "list", "#list-cells", 0, 1, &args);
458 * @list_name: property name that contains a list
459 * @cells_name: property name that specifies phandles' arguments count
463 * @return 0 on success (with @out_args filled out if not NULL), -ENOENT if
464 * @list_name does not exist, -EINVAL if a phandle was not found,
474 * ofnode_count_phandle_with_args() - Count number of phandle in a list
481 * @list_name: property name that contains a list
482 * @cells_name: property name that specifies phandles' arguments count
483 * @return number of phandle on success, -ENOENT if @list_name does not
484 * exist, -EINVAL if a phandle was not found, @cells_name could not
491 * ofnode_path() - find a node by full path
499 * ofnode_get_chosen_prop() - get the value of a chosen property
501 * This looks for a property within the /chosen node and returns its value
503 * @propname: Property name to look for
504 * @return property value if found, else NULL
509 * ofnode_get_chosen_node() - get the chosen node
517 * ofnode_decode_display_timing() - decode display timings
519 * Decode display timings from the supplied 'display-timings' node.
520 * See doc/device-tree-bindings/video/display-timing.txt for binding
523 * @node 'display-timing' node containing the timing subnodes
526 * @return 0 if OK, -FDT_ERR_NOTFOUND if not found
532 * ofnode_get_property()- - get a pointer to the value of a node property
535 * @propname: property to read
537 * @return pointer to property, or NULL if not found
542 * ofnode_is_available() - check if a node is marked available
545 * @return true if node's 'status' property is "okay" (or is missing)
550 * ofnode_get_addr_size() - get address and size from a property
552 * This does no address translation. It simply reads an property that contains
556 * @propname: property to read
564 * ofnode_read_u8_array_ptr() - find an 8-bit array
566 * Look up a property in a node and return a pointer to its contents as a
567 * byte array of given length. The property must have at least enough data
572 * @propname name of property to find
574 * @return pointer to byte array if found, or NULL if the property is not
581 * ofnode_read_pci_addr() - look up a PCI address
583 * Look at an address property in a node and return the PCI address which
585 * The property must hold one fdt_pci_addr with a lengh.
589 * @propname name of property to find
591 * @return 0 if ok, -ENOENT if the property did not exist, -EINVAL if the
592 * format of the property was invalid, -ENXIO if the requested
599 * ofnode_read_pci_vendev() - look up PCI vendor and device id
601 * Look at the compatible property of a device node that represents a PCI
612 * ofnode_read_addr_cells() - Get the number of address cells for a node
614 * This walks back up the tree to find the closest #address-cells property
623 * ofnode_read_size_cells() - Get the number of size cells for a node
625 * This walks back up the tree to find the closest #size-cells property
634 * ofnode_read_simple_addr_cells() - Get the address cells property in a node
639 * @return value of #address-cells property in this node, or 2 if none
644 * ofnode_read_simple_size_cells() - Get the size cells property in a node
649 * @return value of #size-cells property in this node, or 2 if none
654 * ofnode_pre_reloc() - check if a node should be bound before relocation
656 * Device tree nodes can be marked as needing-to-be-bound in the loader stages
662 * After relocation and jumping into the real U-Boot binary it is possible to
666 * -
667 * - u-boot,dm-pre-reloc: legacy and indicates any of TPL or SPL
669 * SPL. Should probably be replaced by u-boot,dm-spl for
678 * ofnode_read_resource() - Read a resource from a node
685 * @return 0 if OK, -ve on error
690 * ofnode_read_resource_byname() - Read a resource from a node by name
693 * 'reg-names' string list property with the names matching the associated
694 * 'reg' property list.
699 * @return 0 if OK, -ve on error
705 * ofnode_by_compatible() - Find the next compatible node
716 * ofnode_by_prop_value() - Find the next node with given property value
722 * beginning) @propname: property name to check @propval: property value to
730 * ofnode_for_each_subnode() - iterate over all subnodes of a parent
754 * ofnode_translate_address() - Tranlate a device-tree address
756 * Translate an address from the device-tree into a CPU physical address. This
768 * ofnode_device_is_compatible() - check if the node is compatible with compat
779 * ofnode_write_prop() - Set a property of a ofnode
784 * @node: The node for whose property should be set
785 * @propname: The name of the property to set
786 * @len: The length of the new value of the property
787 * @value: The new value of the property (must be valid prior to calling
789 * @return 0 if successful, -ve on error
795 * ofnode_write_string() - Set a string property of a ofnode
800 * @node: The node for whose string property should be set
801 * @propname: The name of the string property to set
802 * @value: The new value of the string property (must be valid prior to
804 * @return 0 if successful, -ve on error
809 * ofnode_set_enabled() - Enable or disable a device tree node given by its
812 * This function effectively sets the node's "status" property to either "okay"
819 * @return 0 if successful, -ve on error