Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2de9261c authored by Gary Bisson's avatar Gary Bisson Committed by Alexandre Belloni
Browse files

rtc: m41t80: fix SQWE override when setting an alarm



Currently setting an alarm clears the SQWE bit which means that the
clock output is disabled no matter its previous state.

Signed-off-by: default avatarGary Bisson <gary.bisson@boundarydevices.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
parent 80663607
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -332,6 +332,9 @@ static int m41t80_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
		return err;
		return err;
	}
	}


	/* Keep SQWE bit value */
	alarmvals[0] |= (ret & M41T80_ALMON_SQWE);

	ret = i2c_smbus_read_byte_data(client, M41T80_REG_FLAGS);
	ret = i2c_smbus_read_byte_data(client, M41T80_REG_FLAGS);
	if (ret < 0)
	if (ret < 0)
		return ret;
		return ret;