Re: [PATCH 4/4] rtc:abx80x: Enable xt digital calibration

From: Kirill Kapranov
Date: Fri Apr 09 2021 - 12:56:50 EST


Hi Pavel,

Thank you very much for pointing out the issues.
I redesign all the code deeply, as Alexandre Belloni suggested [1], and the lines you have mentioned are to be fixed too.
Unfortunately, it takes more time than I supposed.

Thank you again!

--
Best Regards,
Kirill Kapranov
Software Engineer
CompuLab Ltd.
[1] https://marc.info/?l=linux-rtc&m=161696606727215&w=2

On 4/9/21 1:46 PM, Pavel Machek wrote:
Hi!

The XT digital calibration feature allows to improve the RTC accuracy,
using a Distributed Digital Calibration function.
See ch. 5.9.1 of AB08XX Series Ultra Low Power RTC IC User's Guide
https://abracon.com/realtimeclock/AB08XX-Application-Manual.pdf

Signed-off-by: Kirill Kapranov <kirill.kapranov@xxxxxxxxxxxxxx>
---
drivers/rtc/rtc-abx80x.c | 145 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 145 insertions(+)


+static const int xt_freq_nom = 32768000; //Nominal XT frequency 32 kHz in mHz

C-style comment?

is it 32 kHz or 32.768 kHz?

+{
+ int retval;
+ long Adj;

Adj -> adj.

+
+static DEVICE_ATTR_WO(xt_frequency);

You are adding new user interface, you sould add documentation.

Best regards,
Pavel




--
Best Regards,
Kirill Kapranov
Software Engineer
CompuLab Ltd.
Tel.: (+972) 48-290-100.Ext 227
Cel.: (+972) 53-9332508