]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
rtc: s35390a: implement reset routine as suggested by the reference
authorUwe Kleine-König <uwe@kleine-koenig.org>
Sat, 2 Jul 2016 15:28:09 +0000 (17:28 +0200)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Thu, 27 Apr 2017 13:03:55 +0000 (10:03 -0300)
commit92265b7e5d48486171248ec9434d834c2d1ba184
tree71cdbaee8bc4a61ef60d0396d927777836975f25
parent8f24208c104c45d635f0493e249f036add76d6e8
rtc: s35390a: implement reset routine as suggested by the reference

BugLink: http://bugs.launchpad.net/bugs/1681862
commit 8e6583f1b5d1f5f129b873f1428b7e414263d847 upstream.

There were two deviations from the reference manual: you have to wait
half a second when POC is active and you might have to repeat
initialization when POC or BLD are still set after the sequence.

Note however that as POC and BLD are cleared by read the driver might
not be able to detect that a reset is necessary. I don't have a good
idea how to fix this.

Additionally report the value read from STATUS1 to the caller. This
prepares the next patch.

Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/rtc/rtc-s35390a.c