diff options
author | Ahmad Fatoum <ahmad@a3f.at> | 2023-02-21 08:07:34 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-02-21 08:50:21 +0100 |
commit | 90f70dbe29586b5fc98a9b96a41772cdd5ae251f (patch) | |
tree | 4e93d9abf1cd6719c25f25346ce1d1723f9a8b58 /include/of.h | |
parent | 4e8713dd6e89f68cb649be94b7796bdd8e7b0be4 (diff) | |
download | barebox-90f70dbe29586b5fc98a9b96a41772cdd5ae251f.tar.gz barebox-90f70dbe29586b5fc98a9b96a41772cdd5ae251f.tar.xz |
of: split part of of_get_stdoutpath into of_find_node_by_chosen
Follow-up commit will also lookup the value of a chosen property by full
path or alias, so factor this out into a helper function.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Link: https://lore.barebox.org/20230221070735.1130600-1-ahmad@a3f.at
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/of.h')
-rw-r--r-- | include/of.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/of.h b/include/of.h index 7ee1304b93..6d0aca0102 100644 --- a/include/of.h +++ b/include/of.h @@ -314,6 +314,8 @@ struct cdev *of_parse_partition(struct cdev *cdev, struct device_node *node); int of_parse_partitions(struct cdev *cdev, struct device_node *node); int of_fixup_partitions(struct device_node *np, struct cdev *cdev); int of_partitions_register_fixup(struct cdev *cdev); +struct device_node *of_find_node_by_chosen(const char *propname, + const char **options); struct device_node *of_get_stdoutpath(unsigned int *); int of_device_is_stdout_path(struct device *dev, unsigned int *baudrate); const char *of_get_model(void); @@ -369,6 +371,12 @@ static inline int of_partitions_register_fixup(struct cdev *cdev) return -ENOSYS; } +static inline struct device_node *of_find_node_by_chosen(const char *propname, + const char **options) +{ + return NULL; +} + static inline struct device_node *of_get_stdoutpath(unsigned int *rate) { return NULL; |