Skip to content

Commit

Permalink
scripts/dts: Fix detection of a GPIO specifier
Browse files Browse the repository at this point in the history
We should only assume a GPIO specifier is either named <FOO>-gpios or
gpios.  Any other form like ngpios should not be considered a GPIO
specifier.  especially since 'ngpios' is the standard property name for
the number of gpio's that are implemented.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
  • Loading branch information
galak committed Aug 7, 2019
1 parent 9976999 commit 8622c34
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/dts/edtlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1357,7 +1357,7 @@ def _gpios(node):
res = {}

for name, prop in node.props.items():
if name.endswith("gpios"):
if name.endswith("-gpios") or name == "gpios":
# Get the prefix from the property name:
# - gpios -> "" (deprecated, should have a prefix)
# - foo-gpios -> "foo"
Expand Down
2 changes: 1 addition & 1 deletion scripts/dts/extract_dts_includes.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def generate_prop_defines(node_path, prop):
compatible.extract(node_path, prop, def_label)
elif 'clocks' in prop:
clocks.extract(node_path, prop, def_label)
elif 'pwms' in prop or 'gpios' in prop:
elif 'pwms' in prop or '-gpios' in prop or prop == "gpios":
prop_values = reduced[node_path]['props'][prop]
generic = prop[:-1] # Drop the 's' from the prop

Expand Down

0 comments on commit 8622c34

Please sign in to comment.