[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200818013543.4283-1-chris.packham@alliedtelesis.co.nz>
Date: Tue, 18 Aug 2020 13:35:43 +1200
From: Chris Packham <chris.packham@...iedtelesis.co.nz>
To: a.zummo@...ertech.it, alexandre.belloni@...tlin.com
Cc: linux-rtc@...r.kernel.org, linux-kernel@...r.kernel.org,
Chris Packham <chris.packham@...iedtelesis.co.nz>
Subject: [PATCH] rtc: ds1307: Clear OSF flag on DS1388 when setting time
Ensure the OSF flag is cleared on the DS1388 when the clock is set.
Fixes: df11b323b16f ("rtc: ds1307: handle oscillator failure flags for ds1388 variant")
Signed-off-by: Chris Packham <chris.packham@...iedtelesis.co.nz>
---
drivers/rtc/rtc-ds1307.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index 54c85cdd019d..c9c3de14bc62 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -352,6 +352,10 @@ static int ds1307_set_time(struct device *dev, struct rtc_time *t)
regmap_update_bits(ds1307->regmap, DS1340_REG_FLAG,
DS1340_BIT_OSF, 0);
break;
+ case ds_1388:
+ regmap_update_bits(ds1307->regmap, DS1388_REG_FLAG,
+ DS1388_BIT_OSF, 0);
+ break;
case mcp794xx:
/*
* these bits were cleared when preparing the date/time
--
2.28.0
Powered by blists - more mailing lists