From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Sat, 6 Feb 2021 16:17:12 -0800 Subject: [PATCH v2 16/33] dtoc: Support headers needed for drivers In-Reply-To: <20210203130121.2478810-17-sjg@chromium.org> References: <20210203130121.2478810-17-sjg@chromium.org> <20210203130121.2478810-1-sjg@chromium.org> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Typically dtoc can detect the header file needed for a driver by looking for the structs that it uses. For example, if a driver as a .priv_auto that uses 'struct serial_priv', then dtoc can search header files for the definition of that struct and use the file. In some cases, enums are used in drivers, typically with the .data field of struct udevice_id. Since dtoc does not support searching for these, add a way to tell dtoc which header to use. This works as a macro included in the driver definition. Signed-off-by: Simon Glass --- (no changes since v1) include/dm/device.h | 18 ++++++++++++++++++ tools/dtoc/src_scan.py | 7 +++++++ tools/dtoc/test_src_scan.py | 4 ++++ 3 files changed, 29 insertions(+) Applied to u-boot-dm, thanks!