From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: xianwei.zhao@amlogic.com
Cc: Yiting Deng <yiting.deng@amlogic.com>,
linux-amlogic@lists.infradead.org, linux-rtc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rtc: amlogic-a4: clear unsupported update interrupt feature
Date: Wed, 19 Aug 2026 15:36:02 +0200 [thread overview]
Message-ID: <20260819133602f197f6b5@mail.local> (raw)
In-Reply-To: <20260624-rtc-feature-v1-1-42dccd22c0ee@amlogic.com>
Hello,
On 24/06/2026 07:24:34+0000, Xianwei Zhao via B4 Relay wrote:
> From: Xianwei Zhao <xianwei.zhao@amlogic.com>
>
> The Amlogic A4 RTC does not support update interrupt. Clear
> RTC_FEATURE_UPDATE_INTERRUPT before registering the RTC device to
> prevent userspace from enabling an unsupported RTC UIE function.
>
Because the driver supports alarms, it should support UIE. Is there any
reason the RTC can't handle arming alarms every seconds?
There are some that would only support alarms avery 2s, in that case,
please set RTC_FEATURE_ALARM_RES_2S.
> Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com>
> ---
> Clear RTC_FEATURE_UPDATE_INTERRUPT before registering the RTC device.
> ---
> drivers/rtc/rtc-amlogic-a4.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/rtc/rtc-amlogic-a4.c b/drivers/rtc/rtc-amlogic-a4.c
> index 50938c35af36..116cf095a9e9 100644
> --- a/drivers/rtc/rtc-amlogic-a4.c
> +++ b/drivers/rtc/rtc-amlogic-a4.c
> @@ -379,6 +379,7 @@ static int aml_rtc_probe(struct platform_device *pdev)
> rtc->rtc_dev->ops = &aml_rtc_ops;
> rtc->rtc_dev->range_min = 0;
> rtc->rtc_dev->range_max = U32_MAX;
> + clear_bit(RTC_FEATURE_UPDATE_INTERRUPT, rtc->rtc_dev->features);
>
> return devm_rtc_register_device(rtc->rtc_dev);
> }
>
> ---
> base-commit: 851d961ff248218f681c53cf0f7f08cf8201a117
> change-id: 20260624-rtc-feature-03ce3f3843a9
>
> Best regards,
> --
> Xianwei Zhao <xianwei.zhao@amlogic.com>
>
>
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
WARNING: multiple messages have this Message-ID (diff)
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: xianwei.zhao@amlogic.com
Cc: Yiting Deng <yiting.deng@amlogic.com>,
linux-amlogic@lists.infradead.org, linux-rtc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rtc: amlogic-a4: clear unsupported update interrupt feature
Date: Wed, 19 Aug 2026 15:36:02 +0200 [thread overview]
Message-ID: <20260819133602f197f6b5@mail.local> (raw)
In-Reply-To: <20260624-rtc-feature-v1-1-42dccd22c0ee@amlogic.com>
Hello,
On 24/06/2026 07:24:34+0000, Xianwei Zhao via B4 Relay wrote:
> From: Xianwei Zhao <xianwei.zhao@amlogic.com>
>
> The Amlogic A4 RTC does not support update interrupt. Clear
> RTC_FEATURE_UPDATE_INTERRUPT before registering the RTC device to
> prevent userspace from enabling an unsupported RTC UIE function.
>
Because the driver supports alarms, it should support UIE. Is there any
reason the RTC can't handle arming alarms every seconds?
There are some that would only support alarms avery 2s, in that case,
please set RTC_FEATURE_ALARM_RES_2S.
> Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com>
> ---
> Clear RTC_FEATURE_UPDATE_INTERRUPT before registering the RTC device.
> ---
> drivers/rtc/rtc-amlogic-a4.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/rtc/rtc-amlogic-a4.c b/drivers/rtc/rtc-amlogic-a4.c
> index 50938c35af36..116cf095a9e9 100644
> --- a/drivers/rtc/rtc-amlogic-a4.c
> +++ b/drivers/rtc/rtc-amlogic-a4.c
> @@ -379,6 +379,7 @@ static int aml_rtc_probe(struct platform_device *pdev)
> rtc->rtc_dev->ops = &aml_rtc_ops;
> rtc->rtc_dev->range_min = 0;
> rtc->rtc_dev->range_max = U32_MAX;
> + clear_bit(RTC_FEATURE_UPDATE_INTERRUPT, rtc->rtc_dev->features);
>
> return devm_rtc_register_device(rtc->rtc_dev);
> }
>
> ---
> base-commit: 851d961ff248218f681c53cf0f7f08cf8201a117
> change-id: 20260624-rtc-feature-03ce3f3843a9
>
> Best regards,
> --
> Xianwei Zhao <xianwei.zhao@amlogic.com>
>
>
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2026-08-19 13:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-24 7:24 [PATCH] rtc: amlogic-a4: clear unsupported update interrupt feature Xianwei Zhao via B4 Relay
2026-06-24 7:24 ` Xianwei Zhao
2026-06-24 7:24 ` Xianwei Zhao via B4 Relay
2026-08-19 13:36 ` Alexandre Belloni [this message]
2026-08-19 13:36 ` Alexandre Belloni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260819133602f197f6b5@mail.local \
--to=alexandre.belloni@bootlin.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=xianwei.zhao@amlogic.com \
--cc=yiting.deng@amlogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.