aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2011-12-12 09:25:58 -0700
committerBen Hutchings <ben@decadent.org.uk>2015-08-07 00:32:16 +0100
commit64e195f6c6da1be9771afd672a452e5c3414a01a (patch)
tree564aa891de02dd236153e9b0f8340ad7373f479d /include
parent29f163de8d5660ab388f97e47b9b1c75c87f9c6b (diff)
downloadkernel_samsung_smdk4412-64e195f6c6da1be9771afd672a452e5c3414a01a.zip
kernel_samsung_smdk4412-64e195f6c6da1be9771afd672a452e5c3414a01a.tar.gz
kernel_samsung_smdk4412-64e195f6c6da1be9771afd672a452e5c3414a01a.tar.bz2
of: Add of_property_match_string() to find index into a string list
commit 7aff0fe33033fc75b61446ba29d38b1b1354af9f upstream. 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> [jt: dropped changes to files not existing in the 3.2 tree] Signed-off-by: Jonathan Toppins <jtoppins@cumulusnetworks.com> Reviewed-by: Andy Gospodarek <gospo@cumulusnetworks.com> Acked-by: Curt Brune <curt@cumulusnetworks.com> Acked-by: Roopa Prabhu <roopa@cumulusnetworks.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'include')
-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 9bf9611..7e8f2c6 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -211,6 +211,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,