public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Camel Guo <camelg@axis.com>
To: Camel Guo <Camel.Guo@axis.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>, kernel <kernel@axis.com>,
	"linux-rtc@vger.kernel.org" <linux-rtc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] rtc: rs5c372: Add RTC_VL_READ, RTC_VL_CLR ioctls
Date: Thu, 11 Nov 2021 09:38:05 +0100	[thread overview]
Message-ID: <ef97a241-d211-6114-e9fe-6e3b48d7643a@axis.com> (raw)
In-Reply-To: <fa032379-2ca6-f5ca-0e84-91ae13a19488@axis.com>

On 11/10/21 3:30 PM, Camel Guo wrote:
> Hello,
> 
> On 11/10/21 3:27 PM, Alexandre Belloni wrote:
>> On 10/11/2021 15:03:49+0100, Camel Guo wrote:
>>> > On 10/11/2021 12:54:54+0100, Camel Guo wrote:
>>> > > From: Camel Guo <camelg@axis.com>
>>> > > +     switch (cmd) {
>>> > > +     case RTC_VL_READ:
>>> > > +             flags = 0;
>>> > > +
>>> > > +             switch (rs5c->type) {
>>> > > +             case rtc_r2025sd:
>>> > > +             case rtc_r2221tl:
>>> > > +                     if ((rs5c->type == rtc_r2025sd && !(ctrl2 & R2x2x_CTRL2_XSTP)) ||
>>> > > +                             (rs5c->type == rtc_r2221tl &&  (ctrl2 & R2x2x_CTRL2_XSTP))) {
>>> > > +                             flags |= RTC_VL_DATA_INVALID;
>>> > > +                     }
>>> > > +                     if (ctrl2 & R2x2x_CTRL2_VDET)
>>> > > +                             flags |= RTC_VL_ACCURACY_LOW;
>>> > 
>>> > Shouldn't that be RTC_VL_BACKUP_LOW?

Fixed in V3.

>>> 
>>> Some drivers (e.g: rv3029_ioctl and rv8803_ioctl) use RTC_VL_ACCURACY_LOW,
>>> but some other drivers (e.g: abx80x_ioctl, pcf2127_rtc_ioctl and
>>> pcf8523_rtc_ioctl) use RTC_VL_BACKUP_LOW instead. Is there any guideline or
>>> document telling the differences between them?
>>> 
>> 
>> RTC_VL_BACKUP_LOW: The backup voltage is low
>> RTC_VL_ACCURACY_LOW: the primary or backup voltage is low, temperature
>> compensation (or similar) has stopped
> 
> Then I agree that we should go for RTC_VL_BACKUP_LOW.

Fixed in V3.

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

All comments are fixed in V3, please review it again.


      parent reply	other threads:[~2021-11-11  8:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-10 11:54 [PATCH] rtc: rs5c372: Add RTC_VL_READ, RTC_VL_CLR ioctls Camel Guo
2021-11-10 13:54 ` Alexandre Belloni
2021-11-10 14:03   ` Camel Guo
2021-11-10 14:27     ` Alexandre Belloni
2021-11-10 14:30       ` Camel Guo
2021-11-10 15:01         ` Camel Guo
2021-11-11  8:38         ` Camel Guo [this message]

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=ef97a241-d211-6114-e9fe-6e3b48d7643a@axis.com \
    --to=camelg@axis.com \
    --cc=Camel.Guo@axis.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=kernel@axis.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    /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