[PATCH 1/5] drivers/rtc/rtc-xgene: Add prescaler support in APM X-Gene RTC driver

Alexandre Belloni alexandre.belloni at bootlin.com
Fri Apr 12 01:23:15 PDT 2024


On 12/04/2024 16:01:43+0800, wefu at redhat.com wrote:
> From: Wei Fu <wefu at redhat.com>
> 
> This patch add Counter Prescaler support in APM X-Gene RTC driver by
> getting prescaler (Optional) property value from dtb.
> 
> Signed-off-by: Wei Fu <wefu at redhat.com>
> ---
>  drivers/rtc/Kconfig     | 10 ++++++++++
>  drivers/rtc/rtc-xgene.c | 31 +++++++++++++++++++++++++++++++
>  2 files changed, 41 insertions(+)
> 
> diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
> index c63e32d012f2..3a89f1e6095d 100644
> --- a/drivers/rtc/Kconfig
> +++ b/drivers/rtc/Kconfig
> @@ -1888,6 +1888,16 @@ config RTC_DRV_XGENE
>  	  This driver can also be built as a module, if so, the module
>  	  will be called "rtc-xgene".
>  
> +config RTC_DRV_XGENE_PRESCALER
> +	bool "Pre-scaler Counter support for APM X-Gene RTC driver"
> +	depends on RTC_DRV_XGENE
> +	depends on ARCH_THEAD
> +	default y
> +	help
> +	  Say Y here if your Soc has Pre-scaler Counter support on rtc-xgene.
> +
> +	  This hardware support can only be found in DW_apb_rtc after v2.06a.
> +

I don't feel like this needs a config option, rather you should have a
proper compatible string that will tell the driver whether the feature
is available.


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



More information about the linux-riscv mailing list