diff options
Diffstat (limited to 'drivers/core')
-rw-r--r-- | drivers/core/ofnode.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c index ac312d6546..79c80df7f4 100644 --- a/drivers/core/ofnode.c +++ b/drivers/core/ofnode.c @@ -260,6 +260,16 @@ int ofnode_read_string_index(ofnode node, const char *property, int index, } } +int ofnode_read_string_count(ofnode node, const char *property) +{ + if (ofnode_is_np(node)) { + return of_property_count_strings(ofnode_to_np(node), property); + } else { + return fdt_stringlist_count(gd->fdt_blob, + ofnode_to_offset(node), property); + } +} + static void ofnode_from_fdtdec_phandle_args(struct fdtdec_phandle_args *in, struct ofnode_phandle_args *out) { |