Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1503407pxf; Fri, 9 Apr 2021 09:58:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+ijdVRzKrCfD4Ef/ITV/WToR4Dir2aL19W9i4mkbw3PvhWEgK2ZC4KgMmc7kKaJJi2LnW X-Received: by 2002:a17:906:4c96:: with SMTP id q22mr16818943eju.269.1617987508576; Fri, 09 Apr 2021 09:58:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617987508; cv=none; d=google.com; s=arc-20160816; b=yNrBNjifJH8noHbW0OCAm3bKei11wmDHvgh1PpS+qO1Kgml30Br7szfj672KCmfAPk gFlW7RvQeAkcnG16peG3GmBQDc6yVPdOlXucNZ3W0q5JaVzg+K3hcyUiNuOomRo5ok/4 nzBk3jyFJmR+lIj4RBt+SFmAaJ39i5P12c67aJfcUpk+nstwKeDQAjiQOtSvlBu7UiPr ear2a8F6A2DUjHpL/SPQ8h1qjepFbmMkVkjy1fmSFexe8nN2hSF2/g9PUeU04kE1oivF JEKqVAEK0nWlcErVKh7W3jMO58LVfaHKgqwGWb2+QJ5J/TjNUVUmnP7ZlDnyQW87LgEm c5xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject; bh=W3sjD3pFwofFFWGH95S5yoAkjhP4uAjfH85vHylo1lU=; b=UhrWzy1HtpF2m9TZdUuc2MT7yABS859mR9HpTc/djCFeuUEPDfFOCnri1WERSbODLl SQDHzZRA4y7GpW3nmo6WQKMNZVfM0nLg/oQfUhVi9LsQnvOB0g2ik6hMeP9FTE6/o5tN iwqe0201iLG5QjSiTJQJ2+mp5Fm29rYGc+Flp3nMF9iyeT77TmYg2XEzf08zWT8zeA9E bZrLa84VTeIKlUDTpGiTGYtLbscBh8J1WqQhlARNtbXYxWNDm1d3Kn+Iew8U23haIjlr OCTAiUXgFHsagjDLx0+HcbO/33UasqhyLwAgyVWmRv89yXOJYzAkJktI7xX26C12bqsV lM3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m20si2162740ejc.530.2021.04.09.09.58.05; Fri, 09 Apr 2021 09:58:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234278AbhDIQ5C (ORCPT + 99 others); Fri, 9 Apr 2021 12:57:02 -0400 Received: from clab.compulab.co.il ([66.147.238.35]:44228 "EHLO clab.compulab.co.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234273AbhDIQ5B (ORCPT ); Fri, 9 Apr 2021 12:57:01 -0400 Received: from [37.142.126.90] (port=59202 helo=zimbra01.compulab.co.il) by clab.compulab.co.il with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lUuR4-00DNMd-MJ; Fri, 09 Apr 2021 12:56:46 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra01.compulab.co.il (Postfix) with ESMTP id D46C5E81CB015; Fri, 9 Apr 2021 19:56:44 +0300 (IDT) Received: from zimbra01.compulab.co.il ([127.0.0.1]) by localhost (zimbra01.compulab.co.il [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 07rZaVU9yM8f; Fri, 9 Apr 2021 19:56:44 +0300 (IDT) Received: from localhost (localhost [127.0.0.1]) by zimbra01.compulab.co.il (Postfix) with ESMTP id 0B934E81CB016; Fri, 9 Apr 2021 19:56:44 +0300 (IDT) X-Virus-Scanned: amavisd-new at zimbra01.compulab.co.il Received: from zimbra01.compulab.co.il ([127.0.0.1]) by localhost (zimbra01.compulab.co.il [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id op_cb5Yi9Y2L; Fri, 9 Apr 2021 19:56:43 +0300 (IDT) Received: from [192.168.11.10] (lifshitz-linux.compulab.local [192.168.11.10]) by zimbra01.compulab.co.il (Postfix) with ESMTPSA id C1D49E81CB015; Fri, 9 Apr 2021 19:56:43 +0300 (IDT) Subject: Re: [PATCH 4/4] rtc:abx80x: Enable xt digital calibration To: Pavel Machek Cc: a.zummo@towertech.it, alexandre.belloni@bootlin.com, phdm@macqel.be, linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210328210232.10395-1-kirill.kapranov@compulab.co.il> <20210328210232.10395-5-kirill.kapranov@compulab.co.il> <20210409104617.GB10988@amd> From: Kirill Kapranov Organization: CompuLab Ltd. Message-ID: Date: Fri, 9 Apr 2021 19:56:43 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20210409104617.GB10988@amd> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - clab.compulab.co.il X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - compulab.co.il X-Get-Message-Sender-Via: clab.compulab.co.il: mailgid no entry from get_recent_authed_mail_ips_entry X-Authenticated-Sender: clab.compulab.co.il: X-Source: X-Source-Args: X-Source-Dir: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >> --- >> 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