@@ -106,9 +106,9 @@ int device_bind_driver_to_node(struct udevice *parent, const char *drv_name,
* @param compat: The compatible string to search for
* @return 0 if there is a match, -ENOENT if no match
*/
-static int driver_check_compatible(const struct udevice_id *of_match,
- const struct udevice_id **of_idp,
- const char *compat)
+int driver_check_compatible(const struct udevice_id *of_match,
+ const struct udevice_id **of_idp,
+ const char *compat)
{
if (!of_match)
return -ENOENT;
@@ -44,6 +44,18 @@ struct uclass_driver *lists_uclass_lookup(enum uclass_id id);
*/
int lists_bind_drivers(struct udevice *parent, bool pre_reloc_only);
+/**
+ * driver_check_compatible() - Check if a driver matches a compatible string
+ *
+ * @param of_match: List of compatible strings to match
+ * @param of_idp: Returns the match that was found
+ * @param compat: The compatible string to search for
+ * @return 0 if there is a match, -ENOENT if no match
+ */
+int driver_check_compatible(const struct udevice_id *of_match,
+ const struct udevice_id **of_idp,
+ const char *compat);
+
/**
* lists_bind_fdt() - bind a device tree node
*
driver_check_compatible() can be useful in particular case, give access to this primitive Signed-off-by: Patrice Chotard <patrice.chotard at st.com> Cc: Jean-Jacques Hiblot <jjhiblot at ti.com> --- drivers/core/lists.c | 6 +++--- include/dm/lists.h | 12 ++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-)