All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Jingbao Qiu <qiujingbao.dlmu@gmail.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 09:17:22 +0100	[thread overview]
Message-ID: <20240122081722868bdda5@mail.local> (raw)
In-Reply-To: <20240122080631.2880-1-qiujingbao.dlmu@gmail.com>

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?


Also, please fix the checkpatch.pl --strict warnings

> +/**
> + * 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.


-- 
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: Jingbao Qiu <qiujingbao.dlmu@gmail.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 09:17:22 +0100	[thread overview]
Message-ID: <20240122081722868bdda5@mail.local> (raw)
In-Reply-To: <20240122080631.2880-1-qiujingbao.dlmu@gmail.com>

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?


Also, please fix the checkpatch.pl --strict warnings

> +/**
> + * 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.


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

Thread overview: 24+ 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 ` 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  8:06   ` Jingbao Qiu
2024-01-22 13:25   ` Emil Renner Berthing
2024-01-22 13:25     ` Emil Renner Berthing
2024-01-23  1:24     ` Jingbao Qiu
2024-01-23  1:24       ` Jingbao Qiu
2024-01-22  8:17 ` Alexandre Belloni [this message]
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
2024-01-22  8:34     ` Jingbao Qiu
2024-01-22  8:37     ` Krzysztof Kozlowski
2024-01-22  8:37       ` Krzysztof Kozlowski
2024-01-22  8:42       ` Jingbao Qiu
2024-01-22  8:42         ` Jingbao Qiu
2024-01-22  9:15     ` Alexandre Belloni
2024-01-22  9:15       ` Alexandre Belloni
2024-01-22  9:23       ` Jingbao Qiu
2024-01-22  9:23         ` Jingbao Qiu
2024-01-22  8:29 ` Krzysztof Kozlowski
2024-01-22  8:29   ` Krzysztof Kozlowski
2024-01-22  8:38   ` Jingbao Qiu
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=20240122081722868bdda5@mail.local \
    --to=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=qiujingbao.dlmu@gmail.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 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.