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: <fa032379-2ca6-f5ca-0e84-91ae13a19488@axis.com>
Date:   Wed, 10 Nov 2021 15:30:39 +0100
From:   Camel Guo <camelg@...s.com>
To:     Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Camel Guo <Camel.Guo@...s.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

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ