aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Lipnitskiy <ilya.lipnitskiy@gmail.com>2021-05-03 20:59:41 -0700
committerDavid Gibson <david@gibson.dropbear.id.au>2021-05-04 14:45:20 +1000
commit9bb9b8d0b4a03d119162221cbdfd91354653d902 (patch)
tree58d4efaa5076f27e475a87469807b5b6496edad7
parentb07b62ee3342db3af74a8bd056dce810764cc7f1 (diff)
downloaddtc-9bb9b8d0b4a03d119162221cbdfd91354653d902.zip
dtc-9bb9b8d0b4a03d119162221cbdfd91354653d902.tar.gz
dtc-9bb9b8d0b4a03d119162221cbdfd91354653d902.tar.bz2
checks: tigthen up nr-gpios prop exception
There are no instances of nr-gpio in the Linux kernel tree, only "[<vendor>,]nr-gpios", so make the check stricter. nr-gpios without a "vendor," prefix is also invalid, according to the DT spec[0], and there are no DT files in the Linux kernel tree with non-vendor nr-gpios. There are some drivers, but they are not DT spec compliant, so don't suppress the check for them. [0]: Link: https://github.com/devicetree-org/dt-schema/blob/cb53a16a1eb3e2169ce170c071e47940845ec26e/schemas/gpio/gpio-consumer.yaml#L20 Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com> Cc: Rob Herring <robh+dt@kernel.org> Message-Id: <20210504035944.8453-2-ilya.lipnitskiy@gmail.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r--checks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/checks.c b/checks.c
index c420772..7e9d73a 100644
--- a/checks.c
+++ b/checks.c
@@ -1494,7 +1494,7 @@ static bool prop_is_gpio(struct property *prop)
* *-gpios and *-gpio can appear in property names,
* so skip over any false matches (only one known ATM)
*/
- if (strstr(prop->name, "nr-gpio"))
+ if (strstr(prop->name, ",nr-gpios"))
return false;
str = strrchr(prop->name, '-');