summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-rv8803.c
diff options
context:
space:
mode:
authorBenoît Thébaudeau <benoit@wsystem.com>2016-07-21 12:41:32 +0200
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>2016-07-28 09:59:43 +0200
commit6f367788d6333a41fefd013975b0b160d5c0a1c8 (patch)
tree6a5708dc0270a37ab116e6db8c2184f1762a1228 /drivers/rtc/rtc-rv8803.c
parentd3700b6b6479d25c646f7c34a6295872322e6410 (diff)
downloadlinux-stable-6f367788d6333a41fefd013975b0b160d5c0a1c8.tar.gz
linux-stable-6f367788d6333a41fefd013975b0b160d5c0a1c8.tar.bz2
linux-stable-6f367788d6333a41fefd013975b0b160d5c0a1c8.zip
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>
Diffstat (limited to 'drivers/rtc/rtc-rv8803.c')
-rw-r--r--drivers/rtc/rtc-rv8803.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-rv8803.c b/drivers/rtc/rtc-rv8803.c
index 24c688eec527..9a2f6a95d5a7 100644
--- a/drivers/rtc/rtc-rv8803.c
+++ b/drivers/rtc/rtc-rv8803.c
@@ -265,7 +265,7 @@ static int rv8803_set_time(struct device *dev, struct rtc_time *tm)
}
ret = rv8803_write_reg(rv8803->client, RV8803_FLAG,
- flags & ~RV8803_FLAG_V2F);
+ flags & ~(RV8803_FLAG_V1F | RV8803_FLAG_V2F));
mutex_unlock(&rv8803->flags_lock);