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>
This commit is contained in:
Simon Glass
2022-09-29 22:43:42 -04:00
committed by Tom Rini
parent 8909066199
commit 66d0d0c188
5 changed files with 125 additions and 17 deletions
+4 -4
View File
@@ -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.
*/