From 96dd39ba2e0b7daaf89a029b4a5dea3be6410a3b Mon Sep 17 00:00:00 2001 From: Alan Carvalho de Assis Date: Tue, 16 Apr 2024 19:26:34 -0300 Subject: [PATCH] board/stm32f4discovery: Fix ds1307.c initialization The ds1307 doesn't need to call i2c_register() because it is done inside stm32_bringup.c Signed-off-by: Alan C. Assis --- boards/arm/stm32/stm32f4discovery/src/stm32_ds1307.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_ds1307.c b/boards/arm/stm32/stm32f4discovery/src/stm32_ds1307.c index 713823208a..06b91f0c8c 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32_ds1307.c +++ b/boards/arm/stm32/stm32f4discovery/src/stm32_ds1307.c @@ -87,17 +87,6 @@ int stm32_ds1307_init(void) return -ENODEV; } -#ifdef CONFIG_I2C_DRIVER - /* Register the I2C to get the "nsh> i2c bus" command working */ - - ret = i2c_register(i2c, DS1307_I2C_BUS); - if (ret < 0) - { - rtcerr("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); - return -ENODEV; - } -#endif - /* Synchronize the system time to the RTC time */ clock_synchronize(NULL);