From c1a13340ce2342e080dfad7f22a987cf7bc7480f Mon Sep 17 00:00:00 2001 From: Arnaud Pouliquen Date: Fri, 25 Apr 2025 14:29:50 +0200 Subject: [PATCH] driver: ipm: introduce IPM_MAX_DATA_SIZE build configuration The ipm_send() allows transferring data through the IPM device. However, depending on the platform, the mailbox peripheral may either transmit a limited amount of data or not transfer data at all. Introducing this configuration allows exposing the IPM capability to the application. This commit defines a default value of 1024 bytes to avoid impacting existing IPM drivers and sets the value to 0 for the STM32 IPCC and STM32 HSEM devices. This allows, in a next step, other devices to use this configuration to expose their capabilities instead of using proprietary configuration or a static definition. Signed-off-by: Arnaud Pouliquen --- drivers/ipm/Kconfig | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/ipm/Kconfig b/drivers/ipm/Kconfig index 8d7a3f3288e..ba4571ed758 100644 --- a/drivers/ipm/Kconfig +++ b/drivers/ipm/Kconfig @@ -8,6 +8,14 @@ menuconfig IPM if IPM +config IPM_MAX_DATA_SIZE + int "Max data size supported" + default 0 if IPM_STM32_IPCC || IPM_STM32_HSEM + default 1024 + help + Define the max size (in bytes) of data that can be transmitted or + received by the IPM device. + config IPM_MHU bool "IPM MHU driver" default y