rtc: ds1307: store previous charge default per chip
authorBastian Krause <bst@pengutronix.de>
Thu, 17 Sep 2020 18:32:44 +0000 (20:32 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 24 Sep 2020 07:56:04 +0000 (09:56 +0200)
commit95a74cbb21a2431dd2fd8918fa26113629b6e13e
tree2f3bf25d3084c113fb2fbb192e12cba6c39f4505
parent1b5b6af788ae59ee73e3f3230dbfa4f0e31d8d18
rtc: ds1307: store previous charge default per chip

Some RTC's batteries and supercaps were charged by default until now.
In contrast other RTCs allow charging but the driver did not configure
them to do so until now. These must not be charged by default to stay
backwards compatible.

In order to do that, store the charge default per chip.

Signed-off-by: Bastian Krause <bst@pengutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20200917183246.19446-7-bst@pengutronix.de
drivers/rtc/rtc-ds1307.c