diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-10-02 08:54:42 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-10-02 08:54:42 +0200 |
commit | 9d7cd03e2a285c0bbe7271afe46f6d717b0c1dfe (patch) | |
tree | 7a6ec7cbb08d534b733d810c33105f2d303a73ae /include | |
parent | 815288c59895ea48ff677ad8f575d3eec679c11b (diff) | |
parent | d21f496abaafcf828bd2dc0ec74d275c524fae65 (diff) | |
download | barebox-9d7cd03e2a285c0bbe7271afe46f6d717b0c1dfe.tar.gz barebox-9d7cd03e2a285c0bbe7271afe46f6d717b0c1dfe.tar.xz |
Merge branch 'for-next/of'
Diffstat (limited to 'include')
-rw-r--r-- | include/of.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/of.h b/include/of.h index e6993fdde1..29694a9020 100644 --- a/include/of.h +++ b/include/of.h @@ -123,6 +123,8 @@ extern struct device_node *of_find_node_by_path_from(struct device_node *from, const char *path); extern struct device_node *of_find_node_by_path(const char *path); extern struct device_node *of_find_node_by_phandle(phandle phandle); +extern struct device_node *of_find_node_by_phandle_from(phandle phandle, + struct device_node *root); extern struct device_node *of_find_node_by_type(struct device_node *from, const char *type); extern struct device_node *of_find_compatible_node(struct device_node *from, @@ -203,6 +205,10 @@ extern int of_property_write_u64_array(struct device_node *np, extern struct device_node *of_parse_phandle(const struct device_node *np, const char *phandle_name, int index); +extern struct device_node *of_parse_phandle_from(const struct device_node *np, + struct device_node *root, + const char *phandle_name, + int index); extern int of_parse_phandle_with_args(const struct device_node *np, const char *list_name, const char *cells_name, int index, struct of_phandle_args *out_args); @@ -437,6 +443,13 @@ static inline struct device_node *of_parse_phandle(const struct device_node *np, return NULL; } +static inline struct device_node *of_parse_phandle_from(const struct device_node *np, + struct device_node *root, + const char *phandle_name, int index) +{ + return NULL; +} + static inline int of_parse_phandle_with_args(const struct device_node *np, const char *list_name, const char *cells_name, int index, struct of_phandle_args *out_args) @@ -472,6 +485,12 @@ static inline struct device_node *of_find_node_by_phandle(phandle phandle) return NULL; } +static inline struct device_node *of_find_node_by_phandle_from(phandle phandle, + struct device_node *root) +{ + return NULL; +} + static inline struct device_node *of_find_compatible_node( struct device_node *from, const char *type, @@ -568,6 +587,9 @@ static inline struct device_d *of_find_device_by_node(struct device_node *np) #define for_each_node_by_name(dn, name) \ for (dn = of_find_node_by_name(NULL, name); dn; \ dn = of_find_node_by_name(dn, name)) +#define for_each_node_by_name_from(dn, root, name) \ + for (dn = of_find_node_by_name(root, name); dn; \ + dn = of_find_node_by_name(dn, name)) #define for_each_compatible_node(dn, type, compatible) \ for (dn = of_find_compatible_node(NULL, type, compatible); dn; \ dn = of_find_compatible_node(dn, type, compatible)) @@ -692,6 +714,7 @@ int of_device_disable_path(const char *path); phandle of_get_tree_max_phandle(struct device_node *root); phandle of_node_create_phandle(struct device_node *node); +int of_set_property_to_child_phandle(struct device_node *node, char *prop_name); struct device_node *of_find_node_by_alias(struct device_node *root, const char *alias); struct device_node *of_find_node_by_path_or_alias(struct device_node *root, |