Skip to content

Commit fc5cd77

Browse files
ulfalizernashif
authored andcommitted
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 <[email protected]>
1 parent 85a08da commit fc5cd77

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

dts/bindings/base/base.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ properties:
66
required: false
77
description: indicates the operational status of a device
88
enum:
9+
- "ok" # Deprecated form
910
- "okay"
1011
- "disabled"
1112
- "reserved"

scripts/dts/edtlib.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2060,7 +2060,8 @@ def _check_dt(dt):
20602060

20612061
# Check that 'status' has one of the values given in the devicetree spec.
20622062

2063-
ok_status = {"okay", "disabled", "reserved", "fail", "fail-sss"}
2063+
# Accept "ok" for backwards compatibility
2064+
ok_status = {"ok", "okay", "disabled", "reserved", "fail", "fail-sss"}
20642065

20652066
for node in dt.node_iter():
20662067
if "status" in node.props:

0 commit comments

Comments
 (0)