diff options
| author | Tom Rini <[email protected]> | 2020-02-11 10:58:41 -0500 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2020-02-11 10:58:41 -0500 |
| commit | 9a8942b53d57149754e0dfc975e0d92d1afd4087 (patch) | |
| tree | de55e5352f3a8a79c413c0b8cb533428e5476841 /include/dm/ofnode.h | |
| parent | ae347120eed8204b1fdf018ddf79131964e57016 (diff) | |
| parent | 21d651fb29cf268b1a5f64d080e3d352ee32c87f (diff) | |
Merge tag 'dm-pull-6feb20' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm
sandbox conversion to SDL2
TPM TEE driver
Various minor sandbox video enhancements
New driver model core utility functions
Diffstat (limited to 'include/dm/ofnode.h')
| -rw-r--r-- | include/dm/ofnode.h | 39 |
1 files changed, 33 insertions, 6 deletions
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h index 4282169706c..b5a50e88499 100644 --- a/include/dm/ofnode.h +++ b/include/dm/ofnode.h @@ -257,9 +257,20 @@ int ofnode_read_u64(ofnode node, const char *propname, u64 *outp); u64 ofnode_read_u64_default(ofnode node, const char *propname, u64 def); /** + * ofnode_read_prop() - Read a property from a node + * + * @node: valid node reference to read property from + * @propname: name of the property to read + * @sizep: if non-NULL, returns the size of the property, or an error code + if not found + * @return property value, or NULL if there is no such property + */ +const void *ofnode_read_prop(ofnode node, const char *propname, int *sizep); + +/** * ofnode_read_string() - Read a string from a property * - * @ref: valid node reference to read property from + * @node: valid node reference to read property from * @propname: name of the property to read * @return string from property value, or NULL if there is no such property */ @@ -510,21 +521,37 @@ int ofnode_count_phandle_with_args(ofnode node, const char *list_name, ofnode ofnode_path(const char *path); /** - * ofnode_get_chosen_prop() - get the value of a chosen property + * ofnode_read_chosen_prop() - get the value of a chosen property * * This looks for a property within the /chosen node and returns its value * * @propname: Property name to look for + * @sizep: Returns size of property, or FDT_ERR_... error code if function + * returns NULL * @return property value if found, else NULL */ -const char *ofnode_get_chosen_prop(const char *propname); +const void *ofnode_read_chosen_prop(const char *propname, int *sizep); /** - * ofnode_get_chosen_node() - get the chosen node + * ofnode_read_chosen_string() - get the string value of a chosen property + * + * This looks for a property within the /chosen node and returns its value, + * checking that it is a valid nul-terminated string + * + * @propname: Property name to look for + * @return string value if found, else NULL + */ +const char *ofnode_read_chosen_string(const char *propname); + +/** + * ofnode_get_chosen_node() - get a referenced node from the chosen node + * + * This looks up a named property in the chosen node and uses that as a path to + * look up a code. * - * @return the chosen node if present, else ofnode_null() + * @return the referenced node if present, else ofnode_null() */ -ofnode ofnode_get_chosen_node(const char *name); +ofnode ofnode_get_chosen_node(const char *propname); struct display_timing; /** |
