zephyr/scripts/dts/extract/directive.py
Kumar Gala 35afcc9c12 scripts: extract_dts_includes: remove passing yaml param to functions
Various functions like add_prop_aliases, extract_single_prop,
extract_single, reg.extract, compatible.extract, default.extract, and
flash.extract don't use the yaml argument that is passed to them.
Remove passing the argument, this is the first step in making access to
the yaml node information go through an accessor function.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-12-07 09:08:04 -06:00

39 lines
893 B
Python

#
# Copyright (c) 2018 Bobby Noelte
#
# SPDX-License-Identifier: Apache-2.0
#
from .globals import *
##
# @brief Base class for device tree directives
#
class DTDirective(object):
##
# @brief Get a label string for a list of label sub-strings.
#
# Label sub-strings are concatenated by '_'.
#
# @param label List of label sub-strings
# @return label string
#
@staticmethod
def get_label_string(label):
return convert_string_to_label(
'_'.join(x.strip() for x in label if x.strip()))
def __init__():
pass
##
# @brief Extract directive information.
#
# @param node_address Address of node issueuing the directive.
# @param prop Directive property name
# @param def_label Define label string of node owning the directive.
#
def extract(self, node_address, prop, def_label):
pass