summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorOleksij Rempel <o.rempel@pengutronix.de>2022-05-03 11:12:18 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-05-05 09:15:13 +0200
commit81dd24a0946c694f3d40dadc0e01254ce15a79bb (patch)
tree225f2df2dd3ef864a5c98e1cd6fad78dba56f4ae /include
parentf721a1d58387569e460edae8a3df0692007103fe (diff)
downloadbarebox-81dd24a0946c694f3d40dadc0e01254ce15a79bb.tar.gz
barebox-81dd24a0946c694f3d40dadc0e01254ce15a79bb.tar.xz
of: add generic of_prepend_machine_compatible()
Add generic function to extend/fixup machine compatible. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.barebox.org/20220503091220.3871612-4-o.rempel@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/common.h3
-rw-r--r--include/of.h6
2 files changed, 9 insertions, 0 deletions
diff --git a/include/common.h b/include/common.h
index 967502a7ab..bd12035688 100644
--- a/include/common.h
+++ b/include/common.h
@@ -129,4 +129,7 @@ void barebox_set_hostname_no_overwrite(const char *);
const char *barebox_get_serial_number(void);
void barebox_set_serial_number(const char *);
+void barebox_set_of_machine_compatible(const char *);
+const char *barebox_get_of_machine_compatible(void);
+
#endif /* __COMMON_H_ */
diff --git a/include/of.h b/include/of.h
index cf9950e9b3..3a8e32f69c 100644
--- a/include/of.h
+++ b/include/of.h
@@ -316,6 +316,7 @@ struct device_node *of_find_node_by_path_or_alias(struct device_node *root,
const char *str);
int of_autoenable_device_by_path(char *path);
int of_autoenable_i2c_by_component(char *path);
+int of_prepend_machine_compatible(struct device_node *root, const char *compat);
#else
static inline bool of_node_name_eq(const struct device_node *np, const char *name)
{
@@ -834,6 +835,11 @@ static inline int of_autoenable_i2c_by_component(char *path)
return -ENODEV;
}
+static int of_prepend_machine_compatible(struct device_node *root,
+ const char *compat)
+{
+ return -ENODEV;
+}
#endif