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:
parent
61e4b06937
commit
5dd715b9c1
1 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue