scripts/dts/edtlib.py: error check # and -map properties

Move when we early out for properties that start with # like
"#address-cells" or end with -map like "interrupt-map" to after we do
some error checking.  This allows us to check those properties at least
exist if they are required.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2019-08-09 09:49:22 -05:00 committed by Kumar Gala
commit 5dd715b9c1

View file

@ -526,11 +526,6 @@ class Device:
def _init_prop(self, name, options):
# _init_props() helper for initializing a single property
# Skip properties that start with '#', like '#size-cells', and mapping
# properties like 'gpio-map'/'interrupt-map'
if name[0] == "#" or name.endswith("-map"):
return
prop_type = options.get("type")
if not prop_type:
_err("'{}' in {} lacks 'type'".format(name, self.binding_path))
@ -548,6 +543,11 @@ class Device:
# 'category: optional' property that wasn't there
return
# Skip properties that start with '#', like '#size-cells', and mapping
# properties like 'gpio-map'/'interrupt-map'
if name[0] == "#" or name.endswith("-map"):
return
prop = Property()
prop.dev = self
prop.name = name