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

drivers: rtc: support for Nuvoton numaker m46x #71929

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions drivers/rtc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ zephyr_library_sources_ifdef(CONFIG_RTC_FAKE rtc_fake.c)
zephyr_library_sources_ifdef(CONFIG_RTC_SMARTBOND rtc_smartbond.c)
zephyr_library_sources_ifdef(CONFIG_RTC_ATMEL_SAM rtc_sam.c)
zephyr_library_sources_ifdef(CONFIG_RTC_RPI_PICO rtc_rpi_pico.c)
zephyr_library_sources_ifdef(CONFIG_RTC_NUMAKER rtc_numaker.c)
1 change: 1 addition & 0 deletions drivers/rtc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,6 @@ source "drivers/rtc/Kconfig.rpi_pico"
source "drivers/rtc/Kconfig.sam"
source "drivers/rtc/Kconfig.smartbond"
source "drivers/rtc/Kconfig.stm32"
source "drivers/rtc/Kconfig.numaker"

endif # RTC
14 changes: 14 additions & 0 deletions drivers/rtc/Kconfig.numaker
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# NUMAKER RTC Driver configuration options

# Copyright (c) 2024 Nuvoton Technology Corporation.
# SPDX-License-Identifier: Apache-2.0

config RTC_NUMAKER
bool "Nuvoton NuMaker MCU RTC driver"
default y
select HAS_NUMAKER_RTC
depends on DT_HAS_NUVOTON_NUMAKER_RTC_ENABLED
Comment on lines +9 to +10
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you take my comment https://github.com/zephyrproject-rtos/zephyr/pull/71929/files#r1579753122 into account, then you can have the select replaced with depends on and the depends on DT_HAS_NUVOTON_NUMAKER_RTC_ENABLED can be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks of your opinion, DT_HAS_xx is asking DTS, and my thinking is like as:
Kconfig.nrfx:

config SPI_NRFX_SPI
	def_bool y
	depends on DT_HAS_NORDIC_NRF_SPI_ENABLED
	select NRFX_SPI0 if HAS_HW_NRF_SPI0

help
This option enables the RTC driver for Nuvoton NuMaker family of
processors.
Say y if you wish to enable NuMaker RTC.