Name

of_property_read_string — read a string from a property

Synopsis

int of_property_read_string (const struct device_node * np,
 const char * propname,
 const char ** out_string);
 

Arguments

np

Pointer to node containing the property

propname

Name of the property to be searched

out_string

Pointer used to return the string

Description

Search for a property in a device tree node and retrieve a null terminated string value (pointer to data, not a copy).

Return

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