@@ -110,6 +110,19 @@ int fdtdec_next_alias(const void *blob, const char *name,
enum fdt_compat_id id, int *upto);
/**
+ * Find the compatible ID for a given node.
+ *
+ * Generally each node has at least one compatible string attached to it.
+ * This function looks through our list of known compatible strings and
+ * returns the corresponding ID which matches the compatible string.
+ *
+ * @param blob FDT blob to use
+ * @param node Node containing compatible string to find
+ * @return compatible ID, or COMPAT_UNKNOWN if we cannot find a match
+ */
+enum fdt_compat_id fdtdec_lookup(const void *blob, int node);
+
+/**
* Look in the FDT for an alias with the given name and return its node.
*
* @param blob FDT blob
@@ -128,7 +128,7 @@ int fdtdec_get_is_enabled(const void *blob, int node)
return 1;
}
-enum fdt_compat_id fd_dec_lookup(const void *blob, int node)
+enum fdt_compat_id fdtdec_lookup(const void *blob, int node)
{
enum fdt_compat_id id;
The name of this function is not consistent, so fix it, and export the function for external use. Signed-off-by: Simon Glass <sjg@chromium.org> --- include/fdtdec.h | 13 +++++++++++++ lib/fdtdec.c | 2 +- 2 files changed, 14 insertions(+), 1 deletions(-)