Skip to content

Commit

Permalink
scripts/dts: Remove DT_CHOSEN generation
Browse files Browse the repository at this point in the history
We never used DT_CHOSEN so lets remove this and add it back if/when
there's an actual need for it.

Signed-off-by: Kumar Gala <[email protected]>
  • Loading branch information
galak committed Jun 25, 2019
1 parent 08a5f9f commit 95f28eb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
8 changes: 0 additions & 8 deletions doc/guides/dts/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -316,14 +316,6 @@ The full set of Zephyr-specific ``chosen`` nodes follows:
* - ``zephyr,uart-mcumgr``
- ``DT_UART_MCUMGR_ON_DEV_NAME``

As chosen properties tend to be related to software configuration, it can be
useful for the build system to know if a chosen property was defined. We
generate a define for each chosen property, for example:

``zephyr,flash`` will generate: ``#define DT_CHOSEN_ZEPHYR_FLASH 1``

As a consequence ``zephyr,flash`` related code could safely be implemented
under ``#ifdef DT_CHOSEN_ZEPHYR_FLASH`` instruction.

Adding support for device tree in drivers
*****************************************
Expand Down
4 changes: 0 additions & 4 deletions scripts/dts/extract_dts_includes.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,10 +454,6 @@ def generate_defines():
flash.extract_flash()
flash.extract_code_partition()

# Add DT_CHOSEN_<X> defines
for c in sorted(chosen):
insert_defs('chosen', {'DT_CHOSEN_' + str_to_label(c): '1'}, {})


def parse_arguments():
rdh = argparse.RawDescriptionHelpFormatter
Expand Down

0 comments on commit 95f28eb

Please sign in to comment.