scripts: dts: Accept 'status = "ok"'
Erroring out for 'status = "ok"' broke backwards compatibility for a downstream project. Accept it instead. Maybe the error could be selectively re-enabled later. The rest of the code only checks for 'status = "disabled"' (like the old scripts), so no other updates are needed. (It's a bit weird that we duplicate the property check in base.yaml. Thinking of including base.yaml implicitly. Could clean things up then.) Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This commit is contained in:
parent
85a08da966
commit
fc5cd772da
2 changed files with 3 additions and 1 deletions
|
@ -6,6 +6,7 @@ properties:
|
||||||
required: false
|
required: false
|
||||||
description: indicates the operational status of a device
|
description: indicates the operational status of a device
|
||||||
enum:
|
enum:
|
||||||
|
- "ok" # Deprecated form
|
||||||
- "okay"
|
- "okay"
|
||||||
- "disabled"
|
- "disabled"
|
||||||
- "reserved"
|
- "reserved"
|
||||||
|
|
|
@ -2060,7 +2060,8 @@ def _check_dt(dt):
|
||||||
|
|
||||||
# Check that 'status' has one of the values given in the devicetree spec.
|
# Check that 'status' has one of the values given in the devicetree spec.
|
||||||
|
|
||||||
ok_status = {"okay", "disabled", "reserved", "fail", "fail-sss"}
|
# Accept "ok" for backwards compatibility
|
||||||
|
ok_status = {"ok", "okay", "disabled", "reserved", "fail", "fail-sss"}
|
||||||
|
|
||||||
for node in dt.node_iter():
|
for node in dt.node_iter():
|
||||||
if "status" in node.props:
|
if "status" in node.props:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue