core: ofnode: add ofnode_get_parent function

The Rockchip video drivers need to walk the ofnode-parrents to find
an enclosing device that has a UCLASS_DISPLAY driver bound.  This
adds a ofnode_get_parent()-function that returns the parent-node.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h
index c359a60..6938e62 100644
--- a/include/dm/ofnode.h
+++ b/include/dm/ofnode.h
@@ -302,6 +302,14 @@
 ofnode ofnode_next_subnode(ofnode node);
 
 /**
+ * ofnode_get_parent() - get the ofnode's parent (enclosing ofnode)
+ *
+ * @node: valid node to look up
+ * @return ofnode reference of the parent node
+ */
+ofnode ofnode_get_parent(ofnode node);
+
+/**
  * ofnode_get_name() - get the name of a node
  *
  * @node: valid node to look up