pylibfdt: Add support for fdt_get_phandle()
Add this into the class to simplify use of this function. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
committed by
David Gibson
parent
b9eba92ea5
commit
a198af8034
@@ -348,6 +348,18 @@ class Fdt:
|
||||
return pdata
|
||||
return bytearray(pdata[0])
|
||||
|
||||
def get_phandle(self, nodeoffset):
|
||||
"""Get the phandle of a node
|
||||
|
||||
Args:
|
||||
nodeoffset: Node offset to check
|
||||
|
||||
Returns:
|
||||
phandle of node, or 0 if the node has no phandle or another error
|
||||
occurs
|
||||
"""
|
||||
return fdt_get_phandle(self._fdt, nodeoffset)
|
||||
|
||||
|
||||
class Property:
|
||||
"""Holds a device tree property name and value.
|
||||
|
||||
Reference in New Issue
Block a user