Lines Matching full:prop
199 def _node_int_prop(node, prop, unit=None): argument
202 property called 'prop' and if that 'prop' is an integer type will return
203 the value of the property 'prop' as either a string int or string hex
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
230 property called 'prop' and if that 'prop' is an array type will return
231 the value of the property 'prop' at the given 'index' as either a string int
232 or string hex value. If the property 'prop' is not found or the given 'index'
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
254 This function takes a 'node', a property name ('prop'), index ('index') and
256 called 'prop' and if that 'prop' is an phandle-array type.
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)
473 def _dt_node_bool_prop_generic(node_search_function, search_arg, prop): argument
476 a node with 'search_arg' and if node exists, checks if 'prop' exists
488 if prop not in node.props:
491 if node.props[prop].type != "boolean":
494 if node.props[prop].val:
499 def dt_node_bool_prop(kconf, _, path, prop): argument
503 by the name of 'prop'. If the 'prop' exists it will return "y" otherwise
509 return _dt_node_bool_prop_generic(edt.get_node, path, prop)
511 def dt_nodelabel_bool_prop(kconf, _, label, prop): argument
515 property by the name of 'prop'. If the 'prop' exists it will return "y"
521 return _dt_node_bool_prop_generic(edt.label2node.get, label, prop)
523 def dt_chosen_bool_prop(kconf, _, chosen, prop): argument
527 property 'prop', it returns "y". Otherwise, it returns "n".
532 return _dt_node_bool_prop_generic(edt.chosen_node, chosen, prop)
534 def _dt_node_has_prop_generic(node_search_function, search_arg, prop): argument
537 a node with 'search_arg' and if node exists, then checks if 'prop'
548 if prop in node.props:
553 def dt_node_has_prop(kconf, _, path, prop): argument
557 by the name of 'prop'. If the 'prop' exists it will return "y" otherwise
563 return _dt_node_has_prop_generic(edt.get_node, path, prop)
565 def dt_nodelabel_has_prop(kconf, _, label, prop): argument
569 by the name of 'prop'. If the 'prop' exists it will return "y" otherwise
575 return _dt_node_has_prop_generic(edt.label2node.get, label, prop)
577 def dt_node_int_prop(kconf, name, path, prop, unit=None): argument
579 This function takes a 'path' and property name ('prop') looks for an EDT
581 node has a property called 'prop' and if that 'prop' is an integer type
582 will return the value of the property 'prop' as either a string int or
603 return str(_node_int_prop(node, prop, unit))
605 return hex(_node_int_prop(node, prop, unit))
608 def dt_node_array_prop(kconf, name, path, prop, index, unit=None): argument
610 This function takes a 'path', property name ('prop') and index ('index')
612 look to see if that node has a property called 'prop' and if that 'prop'
613 is an array type will return the value of the property 'prop' at the given
630 return str(_node_array_prop(node, prop, index, unit))
632 return hex(_node_array_prop(node, prop, index, unit))
635 def dt_node_ph_array_prop(kconf, name, path, prop, index, cell, unit=None): argument
637 This function takes a 'path', property name ('prop'), index ('index') and
640 called 'prop' and if that 'prop' is an phandle-array type.
659 return str(_node_ph_array_prop(node, prop, index, cell, unit))
661 return hex(_node_ph_array_prop(node, prop, index, cell, unit))
663 def dt_node_ph_prop_path(kconf, name, path, prop): argument
665 This function takes a 'path' and a property name ('prop') and
667 it will look to see if that node has a property called 'prop'
668 and if that 'prop' is an phandle type. Then it will return the
680 if prop not in node.props:
682 if node.props[prop].type != "phandle":
685 phandle = node.props[prop].val
689 def dt_node_str_prop_equals(kconf, _, path, prop, val): argument
691 This function takes a 'path' and property name ('prop') looks for an EDT
693 node has a property 'prop' of type string. If that 'prop' is equal to 'val'
705 if prop not in node.props:
708 if node.props[prop].type != "string":
711 if node.props[prop].val == val:
754 def dt_compat_any_has_prop(kconf, _, compat, prop, value=None): argument
756 This function takes a 'compat', a 'prop', and a 'value'.
758 enabled node with compatible 'compat' also has a valid property 'prop'.
760 also has a valid property 'prop' with value 'value'.
768 if prop in node.props:
771 elif str(node.props[prop].val) == value:
775 def dt_compat_any_not_has_prop(kconf, _, compat, prop): argument
777 This function takes a 'compat', and a 'prop'.
779 does NOT contain the property 'prop'.
787 if prop not in node.props:
845 def dt_nodelabel_array_prop_has_val(kconf, _, label, prop, val): argument
849 'prop' with type "array". If so, and the property contains
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"