Re: [PATCH v3 08/12] rtc: rzn1: Dynamically calculate synchronization delay based on clock rate
From: Wolfram Sang
Date: Tue Aug 18 2026 - 06:49:49 EST
> - /* Wait for the counter to stop: two 32k clock cycles */
> - usleep_range(61, 100);
> + /* Wait for the counter to stop: two RTC_PCLK clock cycles */
> + usleep_range(rtc->sync_time, rtc->sync_time + 100);
Hmm, 100 seems more arbitrary here than in the original code? Maybe 2 *
sync_time like below?
> @@ -444,12 +445,20 @@ static int rzn1_rtc_probe(struct platform_device *pdev)
> scmp_val = RZN1_RTC_CTL0_SLSB_SCMP;
> }
>
> + /*
> + * The internal clock counter operates in synchronization with the
> + * RTC_PCLK clock. Calculate the duration of two RTC_PCLK clock
> + * cycles in microseconds required for operations to complete.
> + */
Too wordy, this is enough IMHO:
/* Calculate the duration of two RTC_PCLK clock cycles */
Rest looks good.
Attachment:
signature.asc
Description: PGP signature