include: dt-bindings: Add macros entry point for DTS preprocessor

Introduce <dt-bindings/dt-util.h> file.  It wraps <sys/util_macro.h>
file exposing all macro base definitions to DTS preprocessor.  Once it
contains only prepocessor macros, it can be safely included in DTS,
similar way the <dts/arm/<manufacturer>/pinctrl_<manufacturer>_<soc>.h
files are included.

This provides necessary background to elaborate complex constructions
like variable length macros with zero or more elements.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
This commit is contained in:
Gerson Fernando Budke 2020-10-21 23:12:49 -03:00 committed by Kumar Gala
commit 9b43ac7c76

View file

@ -0,0 +1,21 @@
/*
* Copyright (c) 2020 Gerson Fernando Budke <nandojve@gmail.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_DT_UTIL_H_
#define ZEPHYR_INCLUDE_DT_BINDINGS_DT_UTIL_H_
/*
* This file exists to keep in-tree DTS clean. This means, only
* #include <dt-bindings/foo.h> form should be included. The
* <dt-bindings/dt-util.h> wraps <sys/util_macro.h> file exposing
* all macro base definitions to DTS preprocessor. It provides
* necessary background to elaborate complex constructions like
* variable length macros with zero or more elements.
*/
#include <sys/util_macro.h>
#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_DT_UTIL_H_ */