@@ -211,7 +211,7 @@ class DtbPlatdata(object):
Return:
Number of argument cells is this is a phandle, else None
"""
- if prop.name in ['clocks']:
+ if prop.name in ['clocks', 'cd-gpios']:
if not isinstance(prop.value, list):
prop.value = [prop.value]
val = prop.value
@@ -231,8 +231,11 @@ class DtbPlatdata(object):
if not target:
raise ValueError("Cannot parse '%s' in node '%s'" %
(prop.name, node_name))
- prop_name = '#clock-cells'
- cells = target.props.get(prop_name)
+ cells = None
+ for prop_name in ['#clock-cells', '#gpio-cells']:
+ cells = target.props.get(prop_name)
+ if cells:
+ break
if not cells:
raise ValueError("Node '%s' has no '%s' property" %
(target.name, prop_name))
Signed-off-by: Walter Lozano <walter.lozano at collabora.com> --- tools/dtoc/dtb_platdata.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)