[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <44db2451-852e-7f93-5d61-535e9decfefd@axis.com>
Date: Wed, 10 Nov 2021 16:01:05 +0100
From: Camel Guo <camelg@...s.com>
To: Camel Guo <Camel.Guo@...s.com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>
CC: Alessandro Zummo <a.zummo@...ertech.it>, kernel <kernel@...s.com>,
"linux-rtc@...r.kernel.org" <linux-rtc@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] rtc: rs5c372: Add RTC_VL_READ, RTC_VL_CLR ioctls
Patch V2 has been uploaded. Please review patch v2 instead.
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@...s.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?
>>>
>>> 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.
>
>>
>> --
>> Alexandre Belloni, co-owner and COO, Bootlin
>> Embedded Linux and Kernel engineering
>> https://bootlin.com
Powered by blists - more mailing lists