platform_external_dtc/tests/bad-gpio.dts
Rob Herring c1e7738988 checks: add gpio binding properties check
The GPIO binding is different compared to other phandle plus args
properties in that the property name has a variable, optional prefix.
The format of the property name is [<name>-]gpio{s} where <name> can
be any legal property string. Therefore, custom matching of property
names is needed, but the common check_property_phandle_args() function
can still be used.

It's possible that there are property names matching which are not GPIO
binding specifiers. There's only been one case found in testing which is
"[<vendor>,]nr-gpio{s}". This property has been blacklisted and the same
should be done to any others we find. This check will prevent getting
any more of these, too.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-09-22 21:14:43 +10:00

13 lines
150 B
Text

/dts-v1/;
/ {
gpio: gpio-controller {
#gpio-cells = <3>;
};
node {
nr-gpios = <1>;
foo-gpios = <&gpio>;
bar-gpio = <&gpio 1 2 3>;
};
};