Lines Matching refs:node

68     node = edt.chosen_node(chosen)
69 if not node:
72 if "label" not in node.props:
73 return node.name
75 return node.props["label"].val
86 node = edt.chosen_node(chosen)
87 return "y" if node and node.status == "okay" else "n"
98 node = edt.chosen_node(chosen)
100 return node.path if node else ""
110 node = edt.chosen_node(chosen)
112 if node is None:
115 if compat in node.compats:
120 def dt_node_enabled(kconf, name, node): argument
136 if node.startswith("/"):
145 node = edt.get_node(node)
149 return "y" if node and node.status == "okay" else "n"
162 node = edt.label2node.get(label)
164 return "y" if node and node.status == "okay" else "n"
167 def _node_reg_addr(node, index, unit): argument
168 if not node:
171 if not node.regs:
174 if int(index) >= len(node.regs):
177 if node.regs[int(index)].addr is None:
180 return node.regs[int(index)].addr >> _dt_units_to_scale(unit)
183 def _node_reg_size(node, index, unit): argument
184 if not node:
187 if not node.regs:
190 if int(index) >= len(node.regs):
193 if node.regs[int(index)].size is None:
196 return node.regs[int(index)].size >> _dt_units_to_scale(unit)
199 def _node_int_prop(node, prop, unit=None): argument
215 if not node:
218 if prop not in node.props:
221 if node.props[prop].type != "int":
224 return node.props[prop].val >> _dt_units_to_scale(unit)
227 def _node_array_prop(node, prop, index=0, unit=None): argument
241 if not node:
244 if prop not in node.props:
246 if node.props[prop].type != "array":
248 if int(index) >= len(node.props[prop].val):
250 return node.props[prop].val[int(index)] >> _dt_units_to_scale(unit)
252 def _node_ph_array_prop(node, prop, index, cell, unit=None): argument
267 if not node:
270 if prop not in node.props:
272 if node.props[prop].type != "phandle-array":
274 if int(index) >= len(node.props[prop].val):
276 if cell not in node.props[prop].val[int(index)].data.keys():
278 return node.props[prop].val[int(index)].data[cell] >> _dt_units_to_scale(unit)
299 node = edt.chosen_node(chosen)
301 return _node_reg_addr(node, index, unit)
323 node = edt.chosen_node(chosen)
325 return _node_reg_size(node, index, unit)
363 node = edt.chosen_node(chosen)
364 if not node:
367 p_node = node.parent
371 return _node_reg_addr(p_node.parent, index, unit) + _node_reg_addr(node, 0, unit)
404 node = edt.get_node(path)
408 return _node_reg_addr(node, index, unit)
430 node = edt.get_node(path)
434 return _node_reg_size(node, index, unit)
459 node = None
461 node = edt.label2node.get(label)
464 return str(_dt_node_reg_size(kconf, node.path, index, unit)) if node else "0"
466 return hex(_dt_node_reg_size(kconf, node.path, index, unit)) if node else "0x0"
468 return str(_dt_node_reg_addr(kconf, node.path, index, unit)) if node else "0"
470 return hex(_dt_node_reg_addr(kconf, node.path, index, unit)) if node else "0x0"
481 node = node_search_function(search_arg)
485 if node is None:
488 if prop not in node.props:
491 if node.props[prop].type != "boolean":
494 if node.props[prop].val:
541 node = node_search_function(search_arg)
545 if node is None:
548 if prop in node.props:
598 node = edt.get_node(path)
603 return str(_node_int_prop(node, prop, unit))
605 return hex(_node_int_prop(node, prop, unit))
626 node = edt.get_node(path)
630 return str(_node_array_prop(node, prop, index, unit))
632 return hex(_node_array_prop(node, prop, index, unit))
655 node = edt.get_node(path)
659 return str(_node_ph_array_prop(node, prop, index, cell, unit))
661 return hex(_node_ph_array_prop(node, prop, index, cell, unit))
676 node = edt.get_node(path)
680 if prop not in node.props:
682 if node.props[prop].type != "phandle":
685 phandle = node.props[prop].val
701 node = edt.get_node(path)
705 if prop not in node.props:
708 if node.props[prop].type != "string":
711 if node.props[prop].val == val:
748 for node in edt.compat2okay[compat]:
749 if node.on_buses is not None and bus in node.on_buses:
767 for node in edt.compat2okay[compat]:
768 if prop in node.props:
771 elif str(node.props[prop].val) == value:
786 for node in edt.compat2okay[compat]:
787 if prop not in node.props:
801 node = edt.label2node.get(label)
803 if node and compat in node.compats:
819 node = edt.get_node(path)
823 if node and compat in node.compats:
838 for node in edt.compat2okay[compat]:
839 if label in node.labels:
856 node = edt.label2node.get(label)
858 if not node or (prop not in node.props) or (node.props[prop].type != "array"):
861 return "y" if int(val, base=0) in node.props[prop].val else "n"
873 node = edt.label2node.get(label)
875 return node.path if node else ""
888 node = edt.get_node(path)
892 if node is None:
895 return node.parent.path if node.parent else ""
904 for node in edt.nodes:
905 if node.gpio_hogs and node.status == "okay":