scripts/dts: Fix detection of a GPIO specifier

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>
This commit is contained in:
Kumar Gala 2019-08-07 08:40:14 -05:00 committed by Kumar Gala
commit 8622c3415d
2 changed files with 2 additions and 2 deletions

View file

@ -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"