[PATCH 17/18] of: define of_devices_ensure_probed_by_compatible

Ahmad Fatoum a.fatoum at pengutronix.de
Fri Nov 10 13:44:20 PST 2023


We will need to ensure probe of OP-TEE from SCMI code in a follow-up
commit, so add a small helper to facilitate this.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 include/of.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/include/of.h b/include/of.h
index a7a1ce125fc0..7ebf1f02cc68 100644
--- a/include/of.h
+++ b/include/of.h
@@ -1220,6 +1220,16 @@ int of_device_disable(struct device_node *node);
 int of_device_disable_path(const char *path);
 int of_device_disable_by_alias(const char *alias);
 
+static inline int of_devices_ensure_probed_by_compatible(char *compatible)
+{
+	struct of_device_id match_id[] = {
+		{ .compatible = compatible, },
+		{ /* sentinel */ },
+	};
+
+	return of_devices_ensure_probed_by_dev_id(match_id);
+}
+
 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);
-- 
2.39.2




More information about the barebox mailing list