mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
pylibfdt: Add support for fdt_get_alias()
Add this into the class to simplify use of this function. Signed-off-by: Appana Durga Kedareswara rao <appana.durga.rao@xilinx.com> Message-Id: <1562130487-27028-1-git-send-email-appana.durga.rao@xilinx.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
1c17714dbb
commit
d6de81b81b
2 changed files with 19 additions and 0 deletions
|
@ -431,6 +431,18 @@ class FdtRo(object):
|
|||
"""
|
||||
return fdt_get_phandle(self._fdt, nodeoffset)
|
||||
|
||||
def get_alias(self, name):
|
||||
"""Get the full path referenced by a given alias
|
||||
|
||||
Args:
|
||||
name: name of the alias to lookup
|
||||
|
||||
Returns:
|
||||
Full path to the node for the alias named 'name', if it exists
|
||||
None, if the given alias or the /aliases node does not exist
|
||||
"""
|
||||
return fdt_get_alias(self._fdt, name)
|
||||
|
||||
def parent_offset(self, nodeoffset, quiet=()):
|
||||
"""Get the offset of a node's parent
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue