Skip to content
Permalink
Browse files

dts/extract: Fix IRQ alias define generation

The alias generation wasn't doing the right thing with regards to
keeping the names consistent.  We would drop the index from the define
name for aliases.

So we'd get
	DT_NXP_KINETIS_GPIO_GPIO_D_IRQ
which should be
	DT_NXP_KINETIS_GPIO_GPIO_D_IRQ_0

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
  • Loading branch information...
galak committed Jun 19, 2019
1 parent 6a79bf2 commit 7b638bf3f6d5de4a6c0a838bcc237f9efaea6f9b
Showing with 18 additions and 1 deletion.
  1. +18 −1 scripts/dts/extract/interrupts.py
@@ -69,10 +69,27 @@ def extract(self, node_path, prop, names, def_label):
node_path,
lambda alias:
'_'.join([str_to_label(alias)] +
l_cell_prefix + name + l_cell_name),
l_cell_prefix + l_idx + l_cell_name),
full_name,
prop_alias)

if name:
add_prop_aliases(
node_path,
lambda alias:
'_'.join([str_to_label(alias)] +
l_cell_prefix + name + l_cell_name),
full_name,
prop_alias)
else:
add_prop_aliases(
node_path,
lambda alias:
'_'.join([str_to_label(alias)] +
l_cell_prefix + name + l_cell_name),
full_name,
prop_alias)

index += 1
insert_defs(node_path, prop_def, prop_alias)

0 comments on commit 7b638bf

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