diff options
Diffstat (limited to 'include/linux/of.h')
-rw-r--r-- | include/linux/of.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/linux/of.h b/include/linux/of.h index a0f129284948..1fd08ca23106 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
@@ -235,6 +235,9 @@ extern struct device_node *of_find_node_with_property( | |||
235 | extern struct property *of_find_property(const struct device_node *np, | 235 | extern struct property *of_find_property(const struct device_node *np, |
236 | const char *name, | 236 | const char *name, |
237 | int *lenp); | 237 | int *lenp); |
238 | extern int of_property_read_u32_index(const struct device_node *np, | ||
239 | const char *propname, | ||
240 | u32 index, u32 *out_value); | ||
238 | extern int of_property_read_u8_array(const struct device_node *np, | 241 | extern int of_property_read_u8_array(const struct device_node *np, |
239 | const char *propname, u8 *out_values, size_t sz); | 242 | const char *propname, u8 *out_values, size_t sz); |
240 | extern int of_property_read_u16_array(const struct device_node *np, | 243 | extern int of_property_read_u16_array(const struct device_node *np, |
@@ -353,6 +356,11 @@ static inline struct device_node *of_find_node_by_name(struct device_node *from, | |||
353 | return NULL; | 356 | return NULL; |
354 | } | 357 | } |
355 | 358 | ||
359 | static inline struct device_node *of_get_parent(const struct device_node *node) | ||
360 | { | ||
361 | return NULL; | ||
362 | } | ||
363 | |||
356 | static inline bool of_have_populated_dt(void) | 364 | static inline bool of_have_populated_dt(void) |
357 | { | 365 | { |
358 | return false; | 366 | return false; |
@@ -379,6 +387,11 @@ static inline int of_device_is_compatible(const struct device_node *device, | |||
379 | return 0; | 387 | return 0; |
380 | } | 388 | } |
381 | 389 | ||
390 | static inline int of_device_is_available(const struct device_node *device) | ||
391 | { | ||
392 | return 0; | ||
393 | } | ||
394 | |||
382 | static inline struct property *of_find_property(const struct device_node *np, | 395 | static inline struct property *of_find_property(const struct device_node *np, |
383 | const char *name, | 396 | const char *name, |
384 | int *lenp) | 397 | int *lenp) |
@@ -394,6 +407,12 @@ static inline struct device_node *of_find_compatible_node( | |||
394 | return NULL; | 407 | return NULL; |
395 | } | 408 | } |
396 | 409 | ||
410 | static inline int of_property_read_u32_index(const struct device_node *np, | ||
411 | const char *propname, u32 index, u32 *out_value) | ||
412 | { | ||
413 | return -ENOSYS; | ||
414 | } | ||
415 | |||
397 | static inline int of_property_read_u8_array(const struct device_node *np, | 416 | static inline int of_property_read_u8_array(const struct device_node *np, |
398 | const char *propname, u8 *out_values, size_t sz) | 417 | const char *propname, u8 *out_values, size_t sz) |
399 | { | 418 | { |
@@ -540,4 +559,14 @@ static inline int of_property_read_u32(const struct device_node *np, | |||
540 | return of_property_read_u32_array(np, propname, out_value, 1); | 559 | return of_property_read_u32_array(np, propname, out_value, 1); |
541 | } | 560 | } |
542 | 561 | ||
562 | #if defined(CONFIG_PROC_FS) && defined(CONFIG_PROC_DEVICETREE) | ||
563 | extern void proc_device_tree_add_node(struct device_node *, struct proc_dir_entry *); | ||
564 | extern void proc_device_tree_add_prop(struct proc_dir_entry *pde, struct property *prop); | ||
565 | extern void proc_device_tree_remove_prop(struct proc_dir_entry *pde, | ||
566 | struct property *prop); | ||
567 | extern void proc_device_tree_update_prop(struct proc_dir_entry *pde, | ||
568 | struct property *newprop, | ||
569 | struct property *oldprop); | ||
570 | #endif | ||
571 | |||
543 | #endif /* _LINUX_OF_H */ | 572 | #endif /* _LINUX_OF_H */ |