[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJRtX8QU8iHY1oQJ1uDN3YOmCeN7SH+vPC8nD29WS5+2DT1oKQ@mail.gmail.com>
Date: Mon, 22 Jan 2024 16:34:00 +0800
From: Jingbao Qiu <qiujingbao.dlmu@...il.com>
To: Alexandre Belloni <alexandre.belloni@...tlin.com>
Cc: robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
chao.wei@...hgo.com, unicorn_wang@...look.com, paul.walmsley@...ive.com,
palmer@...belt.com, aou@...s.berkeley.edu, linux-rtc@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-riscv@...ts.infradead.org, dlan@...too.org
Subject: Re: [PATCH v7 2/3] rtc: sophgo: add rtc support for Sophgo CV1800 SoC
On Mon, Jan 22, 2024 at 4:17 PM Alexandre Belloni
<alexandre.belloni@...tlin.com> wrote:
>
> On 22/01/2024 16:06:30+0800, Jingbao Qiu wrote:
> > Implement the RTC driver for CV1800, which able to provide time alarm
> > and calibrate functionality.
> >
> > Signed-off-by: Jingbao Qiu <qiujingbao.dlmu@...il.com>
> > ---
> >
> > Depends on https://lore.kernel.org/all/IA1PR20MB4953C774D41EDF1EADB6EC18BB6D2@IA1PR20MB4953.namprd20.prod.outlook.com/
>
> What is the dependency?
>
Thank you, this driver requires support from the CLK driver.
I will add an explanation in the next version.
>
> Also, please fix the checkpatch.pl --strict warnings
I will use the -- strict option for testing.
>
> > +/**
> > + * cv1800_rtc_32k_coarse_val_calib() - Using an external
> > + * clock to coarse calibrate the crystal oscillator
> > + * @info: the device of calibrated
> > + *
> > + * @return 0 on success, or -1 on fail
> > + *
> > + * This RTC has an independent 32KHz oscillator. However,
> > + * the accuracy of this oscillator is easily affected by
> > + * external environmental interference,resulting in lower
> > + * accuracy than the internal oscillator.Therefore, a 25M
> > + * crystal oscillator is used as a reference source to
> > + * calibrate the RTC and improve its accuracy.Calibration
> > + * is completed through two steps, namely rough calibration
> > + * and fine calibration.
> > + */
> > +static int cv1800_rtc_32k_coarse_val_calib(struct cv1800_rtc_priv *info)
>
> This is still not working as well as you think it is. You should
> Implement the offset callbacks instead.
>
I'm sorry, I don't quite understand offset callbacks.
Do you mean that this function needs to be executed periodically.
Best regards,
Jingbao Qiu
Powered by blists - more mailing lists