Lines Matching +full:dt +full:- +full:property

1 /* SPDX-License-Identifier: GPL-2.0+ */
21 return ofnode_to_np(dev->node); in dev_np()
31 * dev_ofnode() - get the DT node reference associated with a udevice
34 * @return reference of the the device's DT node
38 return dev->node; in dev_ofnode()
48 * dev_read_u32() - read a 32-bit integer from a device's DT property
50 * @dev: device to read DT property from
51 * @propname: name of the property to read from
53 * @return 0 if OK, -ve on error
58 * dev_read_u32_default() - read a 32-bit integer from a device's DT property
60 * @dev: device to read DT property from
61 * @propname: name of the property to read from
62 * @def: default value to return if the property has no value
63 * @return property value, or @def if not found
68 * dev_read_s32() - read a signed 32-bit integer from a device's DT property
70 * @dev: device to read DT property from
71 * @propname: name of the property to read from
73 * @return 0 if OK, -ve on error
78 * dev_read_s32_default() - read a signed 32-bit int from a device's DT property
80 * @dev: device to read DT property from
81 * @propname: name of the property to read from
82 * @def: default value to return if the property has no value
83 * @return property value, or @def if not found
88 * dev_read_u32u() - read a 32-bit integer from a device's DT property
92 * @dev: device to read DT property from
93 * @propname: name of the property to read from
95 * @return 0 if OK, -ve on error
100 * dev_read_string() - Read a string from a device's DT property
102 * @dev: device to read DT property from
103 * @propname: name of the property to read
104 * @return string from property value, or NULL if there is no such property
109 * dev_read_bool() - read a boolean value from a device's DT property
111 * @dev: device to read DT property from
112 * @propname: name of property to read
113 * @return true if property is present (meaning true), false if not present
118 * dev_read_subnode() - find a named subnode of a device
120 * @dev: device whose DT node contains the subnode
128 * dev_read_size() - read the size of a property
131 * @propname: property to check
132 * @return size of property if present, or -EINVAL if not
137 * dev_read_addr_index() - Get the indexed reg property of a device
140 * @index: the 'reg' property can hold a list of <addr, size> pairs
148 * dev_remap_addr_index() - Get the indexed reg property of a device
149 * as a memory-mapped I/O pointer
152 * @index: the 'reg' property can hold a list of <addr, size> pairs
160 * dev_read_addr_name() - Get the reg property of a device, indexed by name
163 * @name: the 'reg' property can hold a list of <addr, size> pairs, with the
164 * 'reg-names' property providing named-based identification. @index
165 * indicates the value to search for in 'reg-names'.
172 * dev_remap_addr_name() - Get the reg property of a device, indexed by name,
173 * as a memory-mapped I/O pointer
176 * @name: the 'reg' property can hold a list of <addr, size> pairs, with the
177 * 'reg-names' property providing named-based identification. @index
178 * indicates the value to search for in 'reg-names'.
185 * dev_read_addr() - Get the reg property of a device
194 * dev_read_addr_ptr() - Get the reg property of a device
204 * dev_remap_addr() - Get the reg property of a device as a
205 * memory-mapped I/O pointer
214 * dev_read_addr_size() - get address and size from a device property
216 * This does no address translation. It simply reads an property that contains
220 * @propname: property to read
228 * dev_read_name() - get the name of a device's node
236 * dev_read_stringlist_search() - find string in a string list and return index
238 * Note that it is possible for this function to succeed on property values
239 * that are not NUL-terminated. That's because the function will stop after
241 * small-valued cell properties, such as #address-cells, when searching for
245 * @propname: name of the property containing the string list
250 * -ENODATA if the property is not found
251 * -EINVAL on some other error
253 int dev_read_stringlist_search(struct udevice *dev, const char *property,
257 * dev_read_string_index() - obtain an indexed string from a string list
260 * @propname: name of the property containing the string list
265 * length of string, if found or -ve error value if not found
271 * dev_read_string_count() - find the number of strings in a string list
274 * @propname: name of the property containing the string list
276 * number of strings in the list, or -ve error value if not found
280 * dev_read_phandle_with_args() - Find a node pointed by phandle in a list
286 * Caller is responsible to call of_node_put() on the returned out_args->np
292 * #list-cells = <2>;
296 * #list-cells = <1>;
304 * dev_read_phandle_with_args(dev, "list", "#list-cells", 0, 1, &args);
307 * @list_name: property name that contains a list
308 * @cells_name: property name that specifies phandles' arguments count
312 * @return 0 on success (with @out_args filled out if not NULL), -ENOENT if
313 * @list_name does not exist, -EINVAL if a phandle was not found,
323 * dev_count_phandle_with_args() - Return phandle number in a list
325 * This function is usefull to get phandle number contained in a property list.
327 * clock's reference contained into the "clocks" property.
331 * @list_name: property name that contains a list
332 * @cells_name: property name that specifies phandles' arguments count
341 * dev_read_addr_cells() - Get the number of address cells for a device's node
343 * This walks back up the tree to find the closest #address-cells property
352 * dev_read_size_cells() - Get the number of size cells for a device's node
354 * This walks back up the tree to find the closest #size-cells property
363 * dev_read_addr_cells() - Get the address cells property in a node
373 * dev_read_size_cells() - Get the size cells property in a node
383 * dev_read_phandle() - Get the phandle from a device
391 * dev_read_prop()- - read a property from a device's node
394 * @propname: property to read
396 * @return pointer to property, or NULL if not found
401 * dev_read_alias_seq() - Get the alias sequence number of a node
409 * @return 0 if a sequence was found, -ve if not
414 * dev_read_u32_array() - Find and read an array of 32 bit integers
416 * Search for a property in a device node and read 32-bit value(s) from
422 * @propname: name of the property to read
425 * @return 0 on success, -EINVAL if the property does not exist, -ENODATA if
426 * property does not have a value, and -EOVERFLOW if the property data isn't
433 * dev_read_first_subnode() - find the first subnode of a device's node
442 * ofnode_next_subnode() - find the next sibling of a subnode
451 * dev_read_u8_array_ptr() - find an 8-bit array
453 * Look up a device's node property and return a pointer to its contents as a
454 * byte array of given length. The property must have at least enough data
459 * @propname: name of property to find
461 * @return pointer to byte array if found, or NULL if the property is not
468 * dev_read_enabled() - check whether a node is enabled
470 * This looks for a 'status' property. If this exists, then returns 1 if
471 * the status is 'ok' and 0 otherwise. If there is no status property,
481 * dev_read_resource() - obtain an indexed resource from a device.
491 * dev_read_resource_byname() - obtain a named resource from a device.
502 * dev_translate_address() - Tranlate a device-tree address
504 * Translate an address from the device-tree into a CPU physical address. This
515 * dev_read_alias_highest_id - Get highest alias id for the given stem
520 * @return alias ID, if found, else -1
673 return fdt_address_cells(gd->fdt_blob, dev_of_offset(dev)); in dev_read_addr_cells()
679 return fdt_size_cells(gd->fdt_blob, dev_of_offset(dev)); in dev_read_size_cells()
684 return fdt_address_cells(gd->fdt_blob, dev_of_offset(dev)); in dev_read_simple_addr_cells()
689 return fdt_size_cells(gd->fdt_blob, dev_of_offset(dev)); in dev_read_simple_size_cells()
694 return fdt_get_phandle(gd->fdt_blob, dev_of_offset(dev)); in dev_read_phandle()
705 return fdtdec_get_alias_seq(gd->fdt_blob, dev->uclass->uc_drv->name, in dev_read_alias_seq()
733 return fdtdec_get_is_enabled(gd->fdt_blob, dev_of_offset(dev)); in dev_read_enabled()
756 return fdtdec_get_alias_highest_id(gd->fdt_blob, stem); in dev_read_alias_highest_id()
762 * dev_for_each_subnode() - Helper function to iterate through subnodes
765 * device-tree node.