lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2024012209151130867663@mail.local>
Date: Mon, 22 Jan 2024 10:15:11 +0100
From: Alexandre Belloni <alexandre.belloni@...tlin.com>
To: Jingbao Qiu <qiujingbao.dlmu@...il.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 22/01/2024 16:34:00+0800, Jingbao Qiu wrote:
> 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.

I mean implement read_offset and set_offset here:
https://elixir.bootlin.com/linux/v6.7/source/include/linux/rtc.h#L67


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ