From: karthikeyan <karthikeyan@linumiz.com>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org,
parthiban@linumiz.com, saravanan@linumiz.com
Subject: Re: [PATCH] drivers: rtc: rv3028: check and update PORF flag during probe
Date: Fri, 29 Mar 2024 21:33:50 +0530 [thread overview]
Message-ID: <1823735f-d677-4f5a-ae39-713f0c9b7777@linumiz.com> (raw)
In-Reply-To: <20240329102847fcdca1cf@mail.local>
Agreed. Thanks for clarification.
Regards,
Karthikeyan Krishnasamy
On 3/29/24 15:58, Alexandre Belloni wrote:
> On 29/03/2024 15:49:40+0530, Karthikeyan Krishnasamy wrote:
>> PORF flag is set during power reset and voltage drop below Vpor
>> data in rtc device is no longer valid if PORF flag is set
>> and software must reset to 0, in order to perform sanity
>> check on rtc data
>>
>> Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
>> ---
>> drivers/rtc/rtc-rv3028.c | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/drivers/rtc/rtc-rv3028.c b/drivers/rtc/rtc-rv3028.c
>> index 2f001c59c61d..e9699ff0c4e8 100644
>> --- a/drivers/rtc/rtc-rv3028.c
>> +++ b/drivers/rtc/rtc-rv3028.c
>> @@ -951,6 +951,13 @@ static int rv3028_probe(struct i2c_client *client)
>> if (ret < 0)
>> return ret;
>>
>> + if (status & RV3028_STATUS_PORF) {
>> + ret = regmap_update_bits(rv3028->regmap, RV3028_STATUS,
>> + RV3028_STATUS_PORF, 0);
>> + if (ret < 0)
>> + return ret;
>> + }
>> +
>
> This breaks the workflow, you must set the time to reset PORF.
>
>> if (status & RV3028_STATUS_AF)
>> dev_warn(&client->dev, "An alarm may have been missed.\n");
>>
>> --
>> 2.34.1
>>
>
prev parent reply other threads:[~2024-03-29 16:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-29 10:19 [PATCH] drivers: rtc: rv3028: check and update PORF flag during probe Karthikeyan Krishnasamy
2024-03-29 10:28 ` Alexandre Belloni
2024-03-29 16:03 ` karthikeyan [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=1823735f-d677-4f5a-ae39-713f0c9b7777@linumiz.com \
--to=karthikeyan@linumiz.com \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=parthiban@linumiz.com \
--cc=saravanan@linumiz.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).