Commit f471b05f authored by Chris Packham's avatar Chris Packham Committed by Alexandre Belloni
Browse files

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: df11b323 ("rtc: ds1307: handle oscillator failure flags for ds1388 variant")
Signed-off-by: default avatarChris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20200818013543.4283-1-chris.packham@alliedtelesis.co.nz
parent 59ed0127
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -353,6 +353,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