rtc: m41t80: fix m41t80_sqw_round_rate return value
authorTroy Kisky <troy.kisky@boundarydevices.com>
Fri, 3 Nov 2017 01:58:13 +0000 (18:58 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Jan 2018 14:48:58 +0000 (15:48 +0100)
commit8932255e96ecd172783c2c5a3a414066bda844cf
tree0e11c82ab2dd8483bf94ba0e253634488f61ce36
parent56073ba4e7068a737a225631b5b642a2cd105b7a
rtc: m41t80: fix m41t80_sqw_round_rate return value

commit c8384bb04261b9d32fe7402a6068ddaf38913b23 upstream.

Previously it was returning the best of
32768, 8192, 1024, 64, 2, 0

Now, best of
32768, 8192, 4096, 2048, 1024, 512, 256, 128,
64, 32, 16, 8, 4, 2, 1, 0

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/rtc/rtc-m41t80.c