Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boards/stm32: Fix ds1307 and move it to stm32/common #12166

Merged
merged 2 commits into from
Apr 17, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
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 <[email protected]>
  • Loading branch information
acassis committed Apr 16, 2024
commit e5c177a1501ea43900fdfc1aee06d0d431a5083e
11 changes: 0 additions & 11 deletions boards/arm/stm32/stm32f4discovery/src/stm32_ds1307.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down