summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-09-07 05:27:18 +0300
committerTom Rini <trini@konsulko.com>2022-09-30 05:43:42 +0300
commit66d0d0c188db9e816c5b18e8823a8d8bf5e9cd63 (patch)
tree382d7c8364b9c1cdbe4a6665410bd2312e1b462f /include
parent8909066199281b86bf4ee7673ec6d7983dd12a26 (diff)
downloadu-boot-66d0d0c188db9e816c5b18e8823a8d8bf5e9cd63.tar.xz
dm: core: Expand integer-reading tests
The current tests do not cover all the behaviour. Add some more. Tidy up a few inconsistencies between livetree and flattree which come to light with these tests. Also drop the -ENODATA error since it is never actually returned. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/dm/of_access.h10
-rw-r--r--include/dm/ofnode.h8
2 files changed, 8 insertions, 10 deletions
diff --git a/include/dm/of_access.h b/include/dm/of_access.h
index dd70b44344..c556a18f7d 100644
--- a/include/dm/of_access.h
+++ b/include/dm/of_access.h
@@ -327,8 +327,7 @@ int of_read_u32(const struct device_node *np, const char *propname, u32 *outp);
* @outp: pointer to return value, modified only if return value is 0.
*
* Return:
- * 0 on success, -EINVAL if the property does not exist,
- * -ENODATA if property does not have a value, and -EOVERFLOW if the
+ * 0 on success, -EINVAL if the property does not exist, or -EOVERFLOW if the
* property data isn't large enough.
*/
int of_read_u32_index(const struct device_node *np, const char *propname,
@@ -345,8 +344,7 @@ int of_read_u32_index(const struct device_node *np, const char *propname,
* @outp: pointer to return value, modified only if return value is 0.
*
* Return:
- * 0 on success, -EINVAL if the property does not exist,
- * -ENODATA if property does not have a value, and -EOVERFLOW if the
+ * 0 on success, -EINVAL if the property does not exist, or -EOVERFLOW if the
* property data isn't large enough.
*/
int of_read_u64(const struct device_node *np, const char *propname, u64 *outp);
@@ -362,8 +360,8 @@ int of_read_u64(const struct device_node *np, const char *propname, u64 *outp);
* @out_values: pointer to return value, modified only if return value is 0.
* @sz: number of array elements to read
* Return:
- * 0 on success, -EINVAL if the property does not exist, -ENODATA
- * if property does not have a value, and -EOVERFLOW is longer than sz.
+ * 0 on success, -EINVAL if the property does not exist, or -EOVERFLOW if
+ * longer than sz.
*/
int of_read_u32_array(const struct device_node *np, const char *propname,
u32 *out_values, size_t sz);
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h
index a674d7d8fd..8b0a108706 100644
--- a/include/dm/ofnode.h
+++ b/include/dm/ofnode.h
@@ -373,12 +373,12 @@ const char *ofnode_read_string(ofnode node, const char *propname);
* @propname: name of the property to read
* @out_values: pointer to return value, modified only if return value is 0
* @sz: number of array elements to read
- * Return: 0 if OK, -ve on error
+ * Return: 0 on success, -EINVAL if the property does not exist,
+ * -ENODATA if property does not have a value, and -EOVERFLOW if the
+ * property data isn't large enough
*
* Search for a property in a device node and read 32-bit value(s) from
- * it. Returns 0 on success, -EINVAL if the property does not exist,
- * -ENODATA if property does not have a value, and -EOVERFLOW if the
- * property data isn't large enough.
+ * it.
*
* The out_values is modified only if a valid u32 value can be decoded.
*/