linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jingbao Qiu <qiujingbao.dlmu@gmail.com>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
	conor+dt@kernel.org,  chao.wei@sophgo.com,
	unicorn_wang@outlook.com, paul.walmsley@sifive.com,
	 palmer@dabbelt.com, aou@eecs.berkeley.edu,
	linux-rtc@vger.kernel.org,  devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,  linux-riscv@lists.infradead.org,
	dlan@gentoo.org
Subject: Re: [PATCH v7 2/3] rtc: sophgo: add rtc support for Sophgo CV1800 SoC
Date: Mon, 22 Jan 2024 16:34:00 +0800	[thread overview]
Message-ID: <CAJRtX8QU8iHY1oQJ1uDN3YOmCeN7SH+vPC8nD29WS5+2DT1oKQ@mail.gmail.com> (raw)
In-Reply-To: <20240122081722868bdda5@mail.local>

On Mon, Jan 22, 2024 at 4:17 PM Alexandre Belloni
<alexandre.belloni@bootlin.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@gmail.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

  reply	other threads:[~2024-01-22  8:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-22  8:06 [PATCH v7 2/3] rtc: sophgo: add rtc support for Sophgo CV1800 SoC Jingbao Qiu
2024-01-22  8:06 ` [PATCH v7 3/3] riscv: dts: sophgo: add rtc dt node for CV1800 Jingbao Qiu
2024-01-22 13:25   ` Emil Renner Berthing
2024-01-23  1:24     ` Jingbao Qiu
2024-01-22  8:17 ` [PATCH v7 2/3] rtc: sophgo: add rtc support for Sophgo CV1800 SoC Alexandre Belloni
2024-01-22  8:34   ` Jingbao Qiu [this message]
2024-01-22  8:37     ` Krzysztof Kozlowski
2024-01-22  8:42       ` Jingbao Qiu
2024-01-22  9:15     ` Alexandre Belloni
2024-01-22  9:23       ` Jingbao Qiu
2024-01-22  8:29 ` Krzysztof Kozlowski
2024-01-22  8:38   ` Jingbao Qiu

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=CAJRtX8QU8iHY1oQJ1uDN3YOmCeN7SH+vPC8nD29WS5+2DT1oKQ@mail.gmail.com \
    --to=qiujingbao.dlmu@gmail.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=chao.wei@sophgo.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlan@gentoo.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=robh+dt@kernel.org \
    --cc=unicorn_wang@outlook.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).