Skip to content

Commit

Permalink
dts/extract: Remove 'use-prop-name' from cell and controller handling
Browse files Browse the repository at this point in the history
We have 'use-prop-name' flag in the bindings which is specifically used
for GPIO properties to control if we get "GPIO" or "GPIOS" as the
generated define name.

Lets remove the inconsistancy and use "GPIOS" as the preferred name as
this matches the DTS property name.  Towards that we will generate both
forms and remove support for 'use-prop-name'.

This also impacts "PWM" generation.  So we'll have "PWM" and "PWMS"

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
  • Loading branch information
galak committed Jun 25, 2019
1 parent 4fabc07 commit 593d628
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 2 additions & 8 deletions scripts/dts/extract/globals.py
Expand Up @@ -438,10 +438,7 @@ def extract_controller(node_path, prop, prop_values, index,
except:
generation = ''

if 'use-prop-name' in generation:
l_cellname = str_to_label(prop + '_' + 'controller')
else:
l_cellname = str_to_label(generic + '_' + 'controller')
l_cellname = str_to_label(generic + '_' + 'controller')

label = l_base + [l_cellname] + l_idx

Expand Down Expand Up @@ -510,10 +507,7 @@ def extract_cells(node_path, prop, prop_values, names, index,
except:
generation = ''

if 'use-prop-name' in generation:
l_cell = [str_to_label(str(prop))]
else:
l_cell = [str_to_label(str(generic))]
l_cell = [str_to_label(str(generic))]

l_base = [def_label]
# Check if #define should be indexed (_0, _1, ...)
Expand Down
2 changes: 2 additions & 0 deletions scripts/dts/extract/reg.py
Expand Up @@ -42,7 +42,9 @@ def extract(self, node_path, names, def_label, div):

if cs_gpios:
extract_controller(node_path, "cs-gpios", cs_gpios, reg[0], def_label, "cs-gpio", True)
extract_controller(node_path, "cs-gpios", cs_gpios, reg[0], def_label, "cs-gpios", True)
extract_cells(node_path, "cs-gpios", cs_gpios, None, reg[0], def_label, "cs-gpio", True)
extract_cells(node_path, "cs-gpios", cs_gpios, None, reg[0], def_label, "cs-gpios", True)

# generate defines
l_base = [def_label]
Expand Down
4 changes: 4 additions & 0 deletions scripts/dts/extract_dts_includes.py
Expand Up @@ -84,8 +84,12 @@ def generate_prop_defines(node_path, prop):

extract_controller(node_path, prop, prop_values, 0,
def_label, generic)
extract_controller(node_path, prop, prop_values, 0,
def_label, prop)
extract_cells(node_path, prop, prop_values,
names, 0, def_label, generic)
extract_cells(node_path, prop, prop_values,
names, 0, def_label, prop)
else:
default.extract(node_path, prop,
binding['properties'][prop]['type'],
Expand Down

0 comments on commit 593d628

Please sign in to comment.