rtc: m41t80: fix SQW dividers override when setting a date
authorGary Bisson <gary.bisson@boundarydevices.com>
Tue, 25 Apr 2017 14:45:15 +0000 (16:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Apr 2018 17:48:14 +0000 (19:48 +0200)
commit2c90ca5c196b68b2b453d1b37cebda35d068ae89
treed500e8e26185d05ab734d7863e78525dc72e8ead
parent489b11ae30afc7b1315559613b7d0abf7249dd4f
rtc: m41t80: fix SQW dividers override when setting a date

[ Upstream commit 0f546b058b86ea2f661cc7a6e931cee5a29959ef ]

This patch is only relevant for RTC with the SQ_ALT feature which
means the clock output frequency divider is stored in the weekday
register.

Current implementation discards the previous dividers value and clear
them as soon as the time is set.

Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/rtc/rtc-m41t80.c