Re: [PATCH 08/12] rtc: rzn1: Dynamically calculate synchronization delay based on clock rate

From: Lad, Prabhakar

Date: Thu Jun 18 2026 - 07:24:01 EST


Hi Wolfram,

Thank you for the review.

On Wed, Jun 17, 2026 at 11:58 AM Wolfram Sang
<wsa+renesas@xxxxxxxxxxxxxxxxxxxx> wrote:
>
>
> As mentioned in another thread:
>
> > drivers/rtc/rtc-rzn1.c | 19 ++++++++++++++-----
> > 1 file changed, 14 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/rtc/rtc-rzn1.c b/drivers/rtc/rtc-rzn1.c
> > index 06339adae71f..bc6af59744e4 100644
> > --- a/drivers/rtc/rtc-rzn1.c
> > +++ b/drivers/rtc/rtc-rzn1.c
> > @@ -71,6 +71,7 @@ struct rzn1_rtc {
> > */
> > spinlock_t ctl1_access_lock;
> > struct rtc_time tm_alarm;
> > + unsigned long sync_time;
> > int alarm_irq;
> > int sec_irq;
> > bool alarm_enabled;
>
> rate = 32768 here...
>
Agreed (in the rzn1_rtc_probe, to be precise).

> > + rtc->sync_time = DIV_ROUND_UP(2 * NSEC_PER_MSEC, rate);
> > +
> > }
>
> ... and move this to the main body of the function.
>
>
> Then, we should have all values always initialized.
>
Agreed, I will fix it in v2.

Cheers,
Prabhakar