提交 2de9261c 编写于 作者: G Gary Bisson 提交者: Alexandre Belloni

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: NGary Bisson <gary.bisson@boundarydevices.com>
Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
上级 80663607
......@@ -332,6 +332,9 @@ static int m41t80_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
return err;
}
/* Keep SQWE bit value */
alarmvals[0] |= (ret & M41T80_ALMON_SQWE);
ret = i2c_smbus_read_byte_data(client, M41T80_REG_FLAGS);
if (ret < 0)
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册