summaryrefslogtreecommitdiff
path: root/include/of.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-10-17 08:10:24 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-10-17 08:10:24 +0200
commit854cdfbe265ebd99619bc6edc594d59b07c156fe (patch)
tree072c0cab0db0e2b703db22add9608d16e8712140 /include/of.h
parent54709a8e5ed1e1d6c07bc24321aede08f27a1d58 (diff)
parent27112f5b5541d736a560dbc9f059d879d4b354a3 (diff)
downloadbarebox-854cdfbe265ebd99619bc6edc594d59b07c156fe.tar.gz
Merge branch 'for-next/of-overlay'
Diffstat (limited to 'include/of.h')
-rw-r--r--include/of.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/include/of.h b/include/of.h
index c8275e169b..98ddf795cb 100644
--- a/include/of.h
+++ b/include/of.h
@@ -871,4 +871,51 @@ static inline struct device_node *of_find_root_node(struct device_node *node)
return node;
}
+
+#ifdef CONFIG_OF_OVERLAY
+struct device_node *of_resolve_phandles(struct device_node *root,
+ const struct device_node *overlay);
+int of_overlay_apply_tree(struct device_node *root,
+ struct device_node *overlay);
+int of_register_overlay(struct device_node *overlay);
+int of_process_overlay(struct device_node *root,
+ struct device_node *overlay,
+ int (*process)(struct device_node *target,
+ struct device_node *overlay, void *data),
+ void *data);
+
+int of_firmware_load_overlay(struct device_node *overlay, const char *path);
+#else
+static inline struct device_node *of_resolve_phandles(struct device_node *root,
+ const struct device_node *overlay)
+{
+ return NULL;
+}
+
+static inline int of_overlay_apply_tree(struct device_node *root,
+ struct device_node *overlay)
+{
+ return -ENOSYS;
+}
+
+static inline int of_register_overlay(struct device_node *overlay)
+{
+ return -ENOSYS;
+}
+
+static inline int of_process_overlay(struct device_node *root,
+ struct device_node *overlay,
+ int (*process)(struct device_node *target,
+ struct device_node *overlay, void *data),
+ void *data)
+{
+ return -ENOSYS;
+}
+
+static inline int of_firmware_load_overlay(struct device_node *overlay, const char *path)
+{
+ return -ENOSYS;
+}
+#endif
+
#endif /* __OF_H */