Skip to content
Permalink
Browse files

dts/extract: Add ability to mark aliases as deprecated

Add a deprecate flag to add_prop_aliases so we can make the aliases it
generates as deprecated if needed.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
  • Loading branch information...
galak committed Jun 19, 2019
1 parent de3d808 commit 6a79bf2571ae6a8f3c11a87d9b00b3968f052a79
Showing with 8 additions and 2 deletions.
  1. +8 −2 scripts/dts/extract/globals.py
@@ -257,7 +257,7 @@ def enable_old_alias_names(enable):
global old_alias_names
old_alias_names = enable

def add_compat_alias(node_path, label_postfix, label, prop_aliases):
def add_compat_alias(node_path, label_postfix, label, prop_aliases, deprecate=False):
if 'instance_id' in reduced[node_path]:
instance = reduced[node_path]['instance_id']
for k in instance:
@@ -267,9 +267,11 @@ def add_compat_alias(node_path, label_postfix, label, prop_aliases):
prop_aliases[b] = label
b = "DT_INST_{}_{}_{}".format(str(i), str_to_label(k), label_postfix)
prop_aliases[b] = label
if deprecate:
deprecated.append(b)

def add_prop_aliases(node_path,
alias_label_function, prop_label, prop_aliases):
alias_label_function, prop_label, prop_aliases, deprecate=False):
node_compat = get_compat(node_path)
new_alias_prefix = 'DT_'

@@ -280,8 +282,12 @@ def add_prop_aliases(node_path,

if new_alias_label != prop_label:
prop_aliases[new_alias_label] = prop_label
if deprecate:
deprecated.append(new_alias_label)
if new_alias_compat_label != prop_label:
prop_aliases[new_alias_compat_label] = prop_label
if deprecate:
deprecated.append(new_alias_compat_label)
if old_alias_names and old_alias_label != prop_label:
prop_aliases[old_alias_label] = prop_label

0 comments on commit 6a79bf2

Please sign in to comment.
You can’t perform that action at this time.