summaryrefslogtreecommitdiffstats
path: root/include/linux/of.h
diff options
context:
space:
mode:
authorGrant Likely2011-12-12 17:25:58 +0100
committerGrant Likely2012-01-28 18:29:20 +0100
commit7aff0fe33033fc75b61446ba29d38b1b1354af9f (patch)
tree2ddcfaf17ab0d98959478fd5133d1fe08adb8eef /include/linux/of.h
parentLinux 3.3-rc1 (diff)
downloadkernel-qcow2-linux-7aff0fe33033fc75b61446ba29d38b1b1354af9f.tar.gz
kernel-qcow2-linux-7aff0fe33033fc75b61446ba29d38b1b1354af9f.tar.xz
kernel-qcow2-linux-7aff0fe33033fc75b61446ba29d38b1b1354af9f.zip
of: Add of_property_match_string() to find index into a string list
Add a helper function for finding the index of a string in a string list property. This helper is useful for bindings that use a separate *-name property for attaching names to tuples in another property such as 'reg' or 'gpios'. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'include/linux/of.h')
-rw-r--r--include/linux/of.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/of.h b/include/linux/of.h
index a75a831e2057..5a4a3adb17e5 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -217,6 +217,9 @@ extern int of_property_read_string(struct device_node *np,
extern int of_property_read_string_index(struct device_node *np,
const char *propname,
int index, const char **output);
+extern int of_property_match_string(struct device_node *np,
+ const char *propname,
+ const char *string);
extern int of_property_count_strings(struct device_node *np,
const char *propname);
extern int of_device_is_compatible(const struct device_node *device,