lkml.org 
[lkml]   [2021]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] rtc: rs5c372: Add RTC_VL_READ, RTC_VL_CLR ioctls
From
Date
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?
>>
>> 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

\
 
 \ /
  Last update: 2021-11-10 15:32    [W:0.073 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site