This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 9a673e831ba4571afd1e288d4e6dc578705e3049
Author: raiden00pl <[email protected]>
AuthorDate: Sat Nov 21 10:32:42 2026 +0100

    arch/arm/src/common/stm32: drop core prefix from the I2C v2 IP name
    
    The I2C v2 block is about to be used by Cortex-M7 (F7/H7) and Cortex-M33
    and M55 (H5/N6) families as well.  An IP version names the silicon only,
    so rename STM32_HAVE_IP_I2C_M3M4_V2 to STM32_HAVE_IP_I2C_V2 together with
    the driver sources (stm32_i2c_v2.c, stm32_i2c_v2_slave.c).
    
    Assisted-by: Claude Code
    Signed-off-by: raiden00pl <[email protected]>
---
 Documentation/guides/chip-specific/stm32_ports.rst                | 4 ++--
 arch/arm/src/common/stm32/CMakeLists.txt                          | 6 +++---
 arch/arm/src/common/stm32/Kconfig.have                            | 2 +-
 arch/arm/src/common/stm32/Make.defs                               | 6 +++---
 arch/arm/src/common/stm32/hardware/stm32_i2c.h                    | 8 ++++----
 arch/arm/src/common/stm32/stm32_i2c.h                             | 2 +-
 arch/arm/src/common/stm32/{stm32_i2c_m3m4_v2.c => stm32_i2c_v2.c} | 2 +-
 .../stm32/{stm32_i2c_m3m4_v2_slave.c => stm32_i2c_v2_slave.c}     | 2 +-
 arch/arm/src/stm32f3/Kconfig                                      | 6 +++---
 arch/arm/src/stm32g4/Kconfig                                      | 2 +-
 10 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/Documentation/guides/chip-specific/stm32_ports.rst 
b/Documentation/guides/chip-specific/stm32_ports.rst
index 4a8e4285679..ca2085bec48 100644
--- a/Documentation/guides/chip-specific/stm32_ports.rst
+++ b/Documentation/guides/chip-specific/stm32_ports.rst
@@ -413,7 +413,7 @@ EXTI          v1              
arch/arm/src/common/stm32/stm32_exti_gpio_m3m4_v1v
 FLASH         F1/F3           
arch/arm/src/common/stm32/stm32_flash_m3m4_f1f3.c      
 GPIO          v1              arch/arm/src/common/stm32/stm32_gpio_m3m4_v1v2.c 
      
 HRTIM         v1              arch/arm/src/common/stm32/stm32_hrtim_m3m4_v1.c  
      
-I2C           v2              arch/arm/src/common/stm32/stm32_i2c_m3m4_v2.c    
      
+I2C           v2              arch/arm/src/common/stm32/stm32_i2c_v2.c
 IWDG          v1              arch/arm/src/common/stm32/stm32_iwdg.c
 OPAMP         v1              arch/arm/src/common/stm32/stm32_opamp_m3m4_v1.c  
      
 RCC           to be done      arch/arm/src/stm32f3/stm32_rcc.c                 
      
@@ -479,7 +479,7 @@ EXTI          v2            
arch/arm/src/common/stm32/stm32_exti_gpio_m3m4_v1v2.
 FLASH         G4            arch/arm/src/common/stm32/stm32_flash_m3m4_g4.c    
    
 GPIO          v1            arch/arm/src/common/stm32/stm32_gpio_m3m4_v1v2.c   
    
 HRTIM         v1            arch/arm/src/common/stm32/stm32_hrtim_m3m4_v1.c    
    
-I2C           v2            arch/arm/src/common/stm32/stm32_i2c_m3m4_v2.c      
    
+I2C           v2            arch/arm/src/common/stm32/stm32_i2c_v2.c
 IWDG          v2            arch/arm/src/common/stm32/stm32_iwdg.c
 LPTIM         v1            arch/arm/src/common/stm32/stm32_lptim.c
 OPAMP         v1            arch/arm/src/common/stm32/stm32_opamp_m3m4_v1.c    
    
diff --git a/arch/arm/src/common/stm32/CMakeLists.txt 
b/arch/arm/src/common/stm32/CMakeLists.txt
index fe3cae17396..80dc80c34b7 100644
--- a/arch/arm/src/common/stm32/CMakeLists.txt
+++ b/arch/arm/src/common/stm32/CMakeLists.txt
@@ -279,10 +279,10 @@ if(CONFIG_STM32_COMMON_LEGACY)
     else()
       list(APPEND SRCS stm32_i2c_m3m4_v1.c)
     endif()
-  elseif(CONFIG_STM32_HAVE_IP_I2C_M3M4_V2)
-    list(APPEND SRCS stm32_i2c_m3m4_v2.c)
+  elseif(CONFIG_STM32_HAVE_IP_I2C_V2)
+    list(APPEND SRCS stm32_i2c_v2.c)
     if(CONFIG_STM32_I2C_SLAVE)
-      list(APPEND SRCS stm32_i2c_m3m4_v2_slave.c)
+      list(APPEND SRCS stm32_i2c_v2_slave.c)
     endif()
   endif()
 
diff --git a/arch/arm/src/common/stm32/Kconfig.have 
b/arch/arm/src/common/stm32/Kconfig.have
index 923fbe5e2e1..fa990832644 100644
--- a/arch/arm/src/common/stm32/Kconfig.have
+++ b/arch/arm/src/common/stm32/Kconfig.have
@@ -485,7 +485,7 @@ config STM32_HAVE_I2C6
 config STM32_HAVE_IP_I2C_M3M4_V1
        bool
 
-config STM32_HAVE_IP_I2C_M3M4_V2
+config STM32_HAVE_IP_I2C_V2
        bool
 
 config STM32_HAVE_IP_I2C_M33M55_V2
diff --git a/arch/arm/src/common/stm32/Make.defs 
b/arch/arm/src/common/stm32/Make.defs
index ba72c1e3c81..49160d4d699 100644
--- a/arch/arm/src/common/stm32/Make.defs
+++ b/arch/arm/src/common/stm32/Make.defs
@@ -284,10 +284,10 @@ CHIP_CSRCS += stm32_i2c_m3m4_v1_f40xxx.c
 else
 CHIP_CSRCS += stm32_i2c_m3m4_v1.c
 endif
-else ifeq ($(CONFIG_STM32_HAVE_IP_I2C_M3M4_V2),y)
-CHIP_CSRCS += stm32_i2c_m3m4_v2.c
+else ifeq ($(CONFIG_STM32_HAVE_IP_I2C_V2),y)
+CHIP_CSRCS += stm32_i2c_v2.c
 ifeq ($(CONFIG_STM32_I2C_SLAVE),y)
-CHIP_CSRCS += stm32_i2c_m3m4_v2_slave.c
+CHIP_CSRCS += stm32_i2c_v2_slave.c
 endif
 endif
 
diff --git a/arch/arm/src/common/stm32/hardware/stm32_i2c.h 
b/arch/arm/src/common/stm32/hardware/stm32_i2c.h
index 19eca23a721..e4c9519d091 100644
--- a/arch/arm/src/common/stm32/hardware/stm32_i2c.h
+++ b/arch/arm/src/common/stm32/hardware/stm32_i2c.h
@@ -29,7 +29,7 @@
 
 #if (defined(CONFIG_STM32_HAVE_IP_I2C_M0_V1) + \
      defined(CONFIG_STM32_HAVE_IP_I2C_M3M4_V1) + \
-     defined(CONFIG_STM32_HAVE_IP_I2C_M3M4_V2) + \
+     defined(CONFIG_STM32_HAVE_IP_I2C_V2) + \
      defined(CONFIG_STM32_HAVE_IP_I2C_M33M55_V2)) > 1
 #  error Only one STM32 I2C IP version must be selected
 #endif
@@ -37,14 +37,14 @@
 #if defined(CONFIG_STM32_HAVE_IP_I2C_M0_V1)
 #  include "hardware/stm32_i2c_v2_m0.h"
 #elif defined(CONFIG_STM32_HAVE_IP_I2C_M3M4_V1) || \
-      defined(CONFIG_STM32_HAVE_IP_I2C_M3M4_V2) || \
+      defined(CONFIG_STM32_HAVE_IP_I2C_V2) || \
       defined(CONFIG_STM32_HAVE_IP_I2C_M33M55_V2)
 
-/* The M3M4 and M33M55 drivers of the I2C v2 share its register map */
+/* The I2C v2 and M33M55 I2C v2 drivers share the register map */
 
 #if defined(CONFIG_STM32_HAVE_IP_I2C_M3M4_V1)
 #  include "stm32_i2c_v1.h"
-#elif defined(CONFIG_STM32_HAVE_IP_I2C_M3M4_V2) || \
+#elif defined(CONFIG_STM32_HAVE_IP_I2C_V2) || \
       defined(CONFIG_STM32_HAVE_IP_I2C_M33M55_V2)
 #  include "stm32_i2c_v2.h"
 #else
diff --git a/arch/arm/src/common/stm32/stm32_i2c.h 
b/arch/arm/src/common/stm32/stm32_i2c.h
index 834372fd75c..f9bfd1dd5ec 100644
--- a/arch/arm/src/common/stm32/stm32_i2c.h
+++ b/arch/arm/src/common/stm32/stm32_i2c.h
@@ -88,7 +88,7 @@ struct i2c_master_s *stm32_i2cbus_initialize(int port);
 
 int stm32_i2cbus_uninitialize(struct i2c_master_s *dev);
 
-#if defined(CONFIG_STM32_HAVE_IP_I2C_M3M4_V1) || 
defined(CONFIG_STM32_HAVE_IP_I2C_M3M4_V2)
+#if defined(CONFIG_STM32_HAVE_IP_I2C_M3M4_V1) || 
defined(CONFIG_STM32_HAVE_IP_I2C_V2)
 /****************************************************************************
  * Name: stm32_i2cbus_slaveinitialize
  *
diff --git a/arch/arm/src/common/stm32/stm32_i2c_m3m4_v2.c 
b/arch/arm/src/common/stm32/stm32_i2c_v2.c
similarity index 99%
rename from arch/arm/src/common/stm32/stm32_i2c_m3m4_v2.c
rename to arch/arm/src/common/stm32/stm32_i2c_v2.c
index 14228ce2a35..4bf0a61daf7 100644
--- a/arch/arm/src/common/stm32/stm32_i2c_m3m4_v2.c
+++ b/arch/arm/src/common/stm32/stm32_i2c_v2.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * arch/arm/src/common/stm32/stm32_i2c_m3m4_v2.c
+ * arch/arm/src/common/stm32/stm32_i2c_v2.c
  *
  * SPDX-License-Identifier: BSD-3-Clause
  * SPDX-FileCopyrightText: 2016-2017 Gregory Nutt. All rights reserved.
diff --git a/arch/arm/src/common/stm32/stm32_i2c_m3m4_v2_slave.c 
b/arch/arm/src/common/stm32/stm32_i2c_v2_slave.c
similarity index 99%
rename from arch/arm/src/common/stm32/stm32_i2c_m3m4_v2_slave.c
rename to arch/arm/src/common/stm32/stm32_i2c_v2_slave.c
index 53ce3975f16..48c14c4a89d 100644
--- a/arch/arm/src/common/stm32/stm32_i2c_m3m4_v2_slave.c
+++ b/arch/arm/src/common/stm32/stm32_i2c_v2_slave.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * arch/arm/src/common/stm32/stm32_i2c_m3m4_v2_slave.c
+ * arch/arm/src/common/stm32/stm32_i2c_v2_slave.c
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
diff --git a/arch/arm/src/stm32f3/Kconfig b/arch/arm/src/stm32f3/Kconfig
index 918b00a451d..6516df66bd8 100644
--- a/arch/arm/src/stm32f3/Kconfig
+++ b/arch/arm/src/stm32f3/Kconfig
@@ -463,7 +463,7 @@ config STM32_STM32F30XX
        select STM32_HAVE_IP_FSMC_M3M4_V1 if STM32_HAVE_FSMC
        select STM32_HAVE_IP_GPIO_M3M4_V1
        select STM32_HAVE_IP_HRTIM_M3M4_V1 if STM32_HAVE_HRTIM1
-       select STM32_HAVE_IP_I2C_M3M4_V2
+       select STM32_HAVE_IP_I2C_V2
        select STM32_HAVE_IP_I2S_M3M4_V1
        select STM32_HAVE_IP_PWR_M3M4_V1
        select STM32_HAVE_IP_RTC_M3M4_V1
@@ -555,7 +555,7 @@ config STM32_STM32F33XX
        select STM32_HAVE_IP_FSMC_M3M4_V1 if STM32_HAVE_FSMC
        select STM32_HAVE_IP_GPIO_M3M4_V1
        select STM32_HAVE_IP_HRTIM_M3M4_V1 if STM32_HAVE_HRTIM1
-       select STM32_HAVE_IP_I2C_M3M4_V2
+       select STM32_HAVE_IP_I2C_V2
        select STM32_HAVE_IP_I2S_M3M4_V1
        select STM32_HAVE_IP_OPAMP_M3M4_V1 if STM32_HAVE_OPAMP1 || 
STM32_HAVE_OPAMP2 || STM32_HAVE_OPAMP3 || STM32_HAVE_OPAMP4 || 
STM32_HAVE_OPAMP5 || STM32_HAVE_OPAMP6
        select STM32_HAVE_IP_PWR_M3M4_V1
@@ -633,7 +633,7 @@ config STM32_STM32F37XX
        select STM32_HAVE_IP_FSMC_M3M4_V1 if STM32_HAVE_FSMC
        select STM32_HAVE_IP_GPIO_M3M4_V1
        select STM32_HAVE_IP_HRTIM_M3M4_V1 if STM32_HAVE_HRTIM1
-       select STM32_HAVE_IP_I2C_M3M4_V2
+       select STM32_HAVE_IP_I2C_V2
        select STM32_HAVE_IP_I2S_M3M4_V1
        select STM32_HAVE_IP_PWR_M3M4_V1
        select STM32_HAVE_IP_RTC_M3M4_V1
diff --git a/arch/arm/src/stm32g4/Kconfig b/arch/arm/src/stm32g4/Kconfig
index e6fafe9fed5..ec1582a094e 100644
--- a/arch/arm/src/stm32g4/Kconfig
+++ b/arch/arm/src/stm32g4/Kconfig
@@ -146,7 +146,7 @@ config STM32_STM32G4XXX
        select STM32_HAVE_IP_FSMC_M3M4_V1 if STM32_HAVE_FSMC
        select STM32_HAVE_IP_GPIO_M3M4_V1
        select STM32_HAVE_IP_HRTIM_M3M4_V1 if STM32_HAVE_HRTIM1
-       select STM32_HAVE_IP_I2C_M3M4_V2
+       select STM32_HAVE_IP_I2C_V2
        select STM32_HAVE_IP_I2S_M3M4_V1
        select STM32_HAVE_IP_OPAMP_M3M4_V1 if STM32_HAVE_OPAMP1 || 
STM32_HAVE_OPAMP2 || STM32_HAVE_OPAMP3 || STM32_HAVE_OPAMP4 || 
STM32_HAVE_OPAMP5 || STM32_HAVE_OPAMP6
        select STM32_HAVE_IP_PWR_M3M4_V1

Reply via email to