dm: core: Pass a root node to of_find_node_by_phandle()

This function currently assumes that the control FDT is used. Update it
to allow a root node to be passed, so it can work with any tree.

Also add a comment to ofnode_get_by_phandle() so that its purpose is
clear.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2022-09-06 20:26:57 -06:00
committed by Tom Rini
parent b5001cb4bd
commit 829d51246f
4 changed files with 10 additions and 5 deletions

View File

@@ -501,6 +501,8 @@ int ofnode_get_path(ofnode node, char *buf, int buflen);
/**
* ofnode_get_by_phandle() - get ofnode from phandle
*
* This uses the default (control) device tree
*
* @phandle: phandle to look up
* Return: ofnode reference to the phandle
*/