Skip to content

Commit 8d07197

Browse files
JHirsbrunnermmahadevan108
authored andcommitted
devicetree: Remove deprecated enum macro
Remove deprecated _ENUM_TOKEN and _ENUM_UPPER_TOKEN. These are deprecated for over three years by now. Signed-off-by: Joel Hirsbrunner <[email protected]>
1 parent 193eeae commit 8d07197

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

doc/releases/release-notes-4.0.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ Removed APIs in this release
4747
* Macro ``K_THREAD_STACK_MEMBER``, deprecated since v3.5.0, has been removed.
4848
Use :c:macro:`K_KERNEL_STACK_MEMBER` instead.
4949
* ``CBPRINTF_PACKAGE_COPY_*`` macros, deprecated since Zephyr 3.5.0, have been removed.
50+
* ``_ENUM_TOKEN`` and ``_ENUM_UPPER_TOKEN`` macros, deprecated since Zephyr 2.7.0,
51+
are no longer generated.
5052

5153
Deprecated in this release
5254
==========================

include/zephyr/devicetree.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@
4747
*
4848
* _ENUM_IDX: property's value as an index into bindings enum
4949
* _ENUM_VAL_<val>_EXISTS property's value as a token exists
50-
* _ENUM_TOKEN: property's value as a token into bindings enum (string
51-
* enum values are identifiers) [deprecated, use _STRING_TOKEN]
52-
* _ENUM_UPPER_TOKEN: like _ENUM_TOKEN, but uppercased [deprecated, use
53-
* _STRING_UPPER_TOKEN]
5450
* _EXISTS: property is defined
5551
* _FOREACH_PROP_ELEM: helper for "iterating" over values in the property
5652
* _FOREACH_PROP_ELEM_VARGS: foreach functions with variable number of arguments

scripts/dts/gen_defines.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -672,14 +672,6 @@ def enum_macros(prop: edtlib.Property, macro: str):
672672
ret[macro + f"_IDX_{i}_EXISTS"] = 1
673673
# DT_N_<node-id>_P_<prop-id>_IDX_<i>_ENUM_VAL_<val>_EXISTS 1
674674
ret[macro + f"_IDX_{i}_ENUM_VAL_{subval}_EXISTS"] = 1
675-
if not spec.enum_tokenizable:
676-
continue
677-
678-
# DT_N_<node-id>_P_<prop-id>_IDX_<i>_ENUM_TOKEN
679-
ret[macro + f"_IDX_{i}_ENUM_TOKEN"] = subval
680-
if spec.enum_upper_tokenizable:
681-
# DT_N_<node-id>_P_<prop-id>_IDX_<i>_ENUM_UPPER_TOKEN
682-
ret[macro + f"_IDX_{i}_ENUM_UPPER_TOKEN"] = subval.upper()
683675

684676
return ret
685677

0 commit comments

Comments
 (0)