Skip to content

Commit 25202b2

Browse files
committed
Devicetree: remove deprecated ok state
The `ok` state is deprecated and very few files are using this. The DTS spec also does not have this value. This PR removes this value once and for all. Signed-off-by: Kyle Micallef Bonnici <[email protected]>
1 parent 9ae10ea commit 25202b2

File tree

10 files changed

+11
-18
lines changed

10 files changed

+11
-18
lines changed

boards/arduino/portenta_c33/arduino_portenta_c33.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
<&ioport1 4 GPIO_ACTIVE_LOW>;
163163

164164
esp_hosted@1 {
165-
status = "ok";
165+
status = "okay";
166166
compatible = "espressif,esp-hosted";
167167
reg = <0x1>;
168168
spi-max-frequency = <DT_FREQ_M(5)>;

boards/shields/adafruit_winc1500/adafruit_winc1500.overlay

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
cs-gpios = <&arduino_header ARDUINO_HEADER_R3_D10 0>;
1212

1313
winc1500_adafruit_winc1500: winc1500@0 {
14-
status = "ok";
14+
status = "okay";
1515
compatible = "atmel,winc1500";
1616
reg = <0x0>;
1717
spi-max-frequency = <4000000>;

doc/build/dts/intro-syntax-structure.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,7 @@ status
282282

283283
A node is considered enabled if its status property is either ``"okay"`` or
284284
not defined (i.e. does not exist in the devicetree source). Nodes with
285-
status ``"disabled"`` are explicitly disabled. (For backwards
286-
compatibility, the value ``"ok"`` is treated the same as ``"okay"``, but
287-
this usage is deprecated.) Devicetree nodes which correspond to physical
285+
status ``"disabled"`` are explicitly disabled. Devicetree nodes which correspond to physical
288286
devices must be enabled for the corresponding ``struct device`` in the
289287
Zephyr driver model to be allocated and initialized.
290288

doc/releases/release-notes-4.3.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ Removed APIs and options
5959
* The legacy pipe object API was removed. Use the new pipe API instead.
6060
* ``bt_le_set_auto_conn``
6161
* ``CONFIG_BT_BUF_ACL_RX_COUNT``
62+
* ``ok`` enum value has now been removed completely from ``base.yaml`` binding ``status`` property in devicetree.
6263

6364
Deprecated APIs and options
6465
===========================

dts/arm/nxp/nxp_lpc55S3x_common.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
reg = <0x34000 0x1000>;
9494
#address-cells = <1>;
9595
#size-cells = <1>;
96-
status = "ok";
96+
status = "okay";
9797

9898
flash0: flash@0 {
9999
compatible = "soc-nv-flash";

dts/bindings/base/base.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ properties:
1616
1717
For details, see "2.3.4 status" in Devicetree Specification v0.4.
1818
enum:
19-
- "ok" # Deprecated form
2019
- "okay"
2120
- "disabled"
2221
- "reserved"

samples/drivers/fuel_gauge/boards/nrf52840dk_nrf52840.overlay

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
pinctrl-names = "default", "sleep";
1919
max17048: max17048@36 {
2020
compatible = "maxim,max17048";
21-
status = "ok";
21+
status = "okay";
2222
reg = <0x36>;
2323
};
2424
};

samples/net/gptp/boards/frdm_k64f.overlay

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
&enet {
88

99
ptp {
10-
status = "ok";
10+
status = "okay";
1111
};
1212
};

samples/net/wifi/shell/boards/reel_board.overlay

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@
2424
};
2525

2626
&spi3 {
27-
status = "ok";
27+
status = "okay";
2828
cs-gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
2929
pinctrl-0 = <&spi3_default_alt>;
3030
pinctrl-1 = <&spi3_sleep_alt>;
3131
pinctrl-names = "default", "sleep";
3232

3333
winc1500@0 {
34-
status = "ok";
34+
status = "okay";
3535
compatible = "atmel,winc1500";
3636
reg = <0x0>;
3737
spi-max-frequency = <4000000>;

scripts/dts/python-devicetree/src/devicetree/edtlib.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -972,8 +972,7 @@ class Node:
972972
973973
status:
974974
The node's status property value, as a string, or "okay" if the node
975-
has no status property set. If the node's status property is "ok",
976-
it is converted to "okay" for consistency.
975+
has no status property set.
977976
978977
read_only:
979978
True if the node has a 'read-only' property, and False otherwise
@@ -1199,9 +1198,6 @@ def status(self) -> str:
11991198
else:
12001199
as_string = status.to_string()
12011200

1202-
if as_string == "ok":
1203-
as_string = "okay"
1204-
12051201
return as_string
12061202

12071203
@property
@@ -3312,8 +3308,7 @@ def _check_dt(dt: DT) -> None:
33123308

33133309
# Check that 'status' has one of the values given in the devicetree spec.
33143310

3315-
# Accept "ok" for backwards compatibility
3316-
ok_status = {"ok", "okay", "disabled", "reserved", "fail", "fail-sss"}
3311+
ok_status = {"okay", "disabled", "reserved", "fail", "fail-sss"}
33173312

33183313
for node in dt.node_iter():
33193314
if "status" in node.props:

0 commit comments

Comments
 (0)