mirror of
https://xff.cz/git/u-boot/
synced 2025-09-03 09:42:22 +02:00
fdt: Add a function to count strings
Given a device tree node and a property name, the fdt_count_strings() function counts the number of strings found in the property value. Signed-off-by: Thierry Reding <treding@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
committed by
Simon Glass
parent
a84c8107d9
commit
bc4147ab2d
@@ -857,6 +857,15 @@ int fdt_node_offset_by_compatible(const void *fdt, int startoffset,
|
||||
*/
|
||||
int fdt_stringlist_contains(const char *strlist, int listlen, const char *str);
|
||||
|
||||
/**
|
||||
* fdt_count_strings - count the number of strings in a string list
|
||||
* @fdt: pointer to the device tree blob
|
||||
* @node: offset of the node
|
||||
* @property: name of the property containing the string list
|
||||
* @return: the number of strings in the given property
|
||||
*/
|
||||
int fdt_count_strings(const void *fdt, int node, const char *property);
|
||||
|
||||
/**********************************************************************/
|
||||
/* Read-only functions (addressing related) */
|
||||
/**********************************************************************/
|
||||
|
Reference in New Issue
Block a user