aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorBenoit Cousson <b-cousson@ti.com>2011-09-27 11:45:43 -0400
committerKevin Hilman <khilman@ti.com>2011-10-04 12:52:23 -0400
commit4fcd15a032cec4b2684a32c86e895b50cdbee50c (patch)
tree21f86422ba269e5ddec5916fbd88bc294e9d7451 /include/linux
parentf718e2c034bf6ff872106344935006230764cb12 (diff)
of: Add helpers to get one string in multiple strings property
Add of_property_read_string_index and of_property_count_strings to retrieve one string inside a property that will contains severals strings. Signed-off-by: Benoit Cousson <b-cousson@ti.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/of.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/of.h b/include/linux/of.h
index 9180dc5cb00b..5dfe2d5a8b5d 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -203,6 +203,11 @@ extern int of_property_read_u32_array(const struct device_node *np,
203extern int of_property_read_string(struct device_node *np, 203extern int of_property_read_string(struct device_node *np,
204 const char *propname, 204 const char *propname,
205 const char **out_string); 205 const char **out_string);
206extern int of_property_read_string_index(struct device_node *np,
207 const char *propname,
208 int index, const char **output);
209extern int of_property_count_strings(struct device_node *np,
210 const char *propname);
206extern int of_device_is_compatible(const struct device_node *device, 211extern int of_device_is_compatible(const struct device_node *device,
207 const char *); 212 const char *);
208extern int of_device_is_available(const struct device_node *device); 213extern int of_device_is_available(const struct device_node *device);
@@ -256,6 +261,19 @@ static inline int of_property_read_string(struct device_node *np,
256 return -ENOSYS; 261 return -ENOSYS;
257} 262}
258 263
264static inline int of_property_read_string_index(struct device_node *np,
265 const char *propname, int index,
266 const char **out_string)
267{
268 return -ENOSYS;
269}
270
271static inline int of_property_count_strings(struct device_node *np,
272 const char *propname)
273{
274 return -ENOSYS;
275}
276
259static inline const void *of_get_property(const struct device_node *node, 277static inline const void *of_get_property(const struct device_node *node,
260 const char *name, 278 const char *name,
261 int *lenp) 279 int *lenp)