summaryrefslogtreecommitdiff
path: root/include/dm/ofnode.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2025-01-10 17:00:28 -0700
committerTom Rini <trini@konsulko.com>2025-01-22 17:08:24 -0600
commitaacc05b07d28e01bbbaf9037b3e8e1275e48701f (patch)
tree4af4bd71b7f85f818ed1defb81f60e037d6735b2 /include/dm/ofnode.h
parentff698f2ddbcce5601a19fd61bef45aedd3d59cc6 (diff)
dm: core: Provide ofnode_name_eq_unit() to accept a unit address
When a unit-address is provided, use it to match against the node name. Since this increases code size, put it into a separate function. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/dm/ofnode.h')
-rw-r--r--include/dm/ofnode.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h
index 2f3da384eba..8e4c3574df8 100644
--- a/include/dm/ofnode.h
+++ b/include/dm/ofnode.h
@@ -395,6 +395,20 @@ void oftree_dispose(oftree tree);
bool ofnode_name_eq(ofnode node, const char *name);
/**
+ * ofnode_name_eq_unit() - Check a node name ignoring its unit address
+ *
+ * This is separate from ofnode_name_eq() to avoid code-size increase for
+ * boards which don't need this function
+ *
+ * @node: valid node to compared, which may have a unit address
+ * @name: name to compare with the node name. If this contains a unit
+ * address, it is matched, otherwise the unit address is ignored
+ * when searching for matches
+ * Return: true if matches, false if it doesn't match
+ */
+bool ofnode_name_eq_unit(ofnode node, const char *name);
+
+/**
* ofnode_read_u8() - Read a 8-bit integer from a property
*
* @node: valid node reference to read property from