Name

of_property_match_string — find string in a list and return index

Synopsis

int of_property_match_string (const struct device_node * np,
 const char * propname,
 const char * string);
 

Arguments

np

Pointer to node containing the string list property

propname

String list property name

string

Pointer to string to search for in string list

Description

This function searches a string list property and returns the index of a specific string value.

Return

Index of string value on success, -EINVAL if the property does not exist, -ENODATA if property does not have a value or the string is not found, and -EILSEQ if the string is not null-terminated within the length of the property data.