Skip to content

Commit 6f36778

Browse files
bthebaudeaualexandrebelloni
authored andcommitted
rtc: rv8803: Clear V1F when setting the time
V1F indicates that the time accuracy may have been compromised because of a voltage drop (possibly only temporary) below VLOW1, which stops the temperature compensation. When the time is set, the accuracy is restored, so V1F should be cleared in order to indicate this and to be able to detect the next temperature compensation loss. This is the same principle as for V2F, which is cleared when the time is set to indicate that the time is no longer invalid and to be able to detect the next data loss. Signed-off-by: Benoît Thébaudeau <benoit@wsystem.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
1 parent d3700b6 commit 6f36778

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/rtc/rtc-rv8803.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ static int rv8803_set_time(struct device *dev, struct rtc_time *tm)
265265
}
266266

267267
ret = rv8803_write_reg(rv8803->client, RV8803_FLAG,
268-
flags & ~RV8803_FLAG_V2F);
268+
flags & ~(RV8803_FLAG_V1F | RV8803_FLAG_V2F));
269269

270270
mutex_unlock(&rv8803->flags_lock);
271271

0 commit comments

Comments
 (0)